다음을 통해 공유


UInt32Converter 클래스

32비트 부호 없는 정수 개체와 여러 가지 다른 표현 사이를 변환하는 형식 변환기를 제공합니다.

네임스페이스: System.ComponentModel
어셈블리: System(system.dll)

구문

‘선언
Public Class UInt32Converter
    Inherits BaseNumberConverter
‘사용 방법
Dim instance As UInt32Converter
public class UInt32Converter : BaseNumberConverter
public ref class UInt32Converter : public BaseNumberConverter
public class UInt32Converter extends BaseNumberConverter
public class UInt32Converter extends BaseNumberConverter

설명

이 변환기에서는 32비트 부호 없는 정수와 문자열 사이의 변환만 수행할 수 있습니다.

UInt32 값 형식은 값의 범위가 0에서 4,294,967,295까지인 부호 없는 정수를 나타냅니다. 이 데이터 형식도 Visual Basic에서 지원되지 않습니다.

참고

UInt32Converter의 인스턴스를 만들지 마십시오. 대신 TypeDescriptorGetConverter 메서드를 호출합니다. 자세한 내용은 TypeConverter 기본 클래스 및 방법: 형식 변환기 구현의 예제를 참조하십시오.

이 클래스에 적용되는 HostProtectionAttribute 특성의 Resources 속성 값은 SharedState입니다. HostProtectionAttribute는 대개 아이콘을 두 번 클릭하거나, 명령을 입력하거나, 브라우저에서 URL을 입력하여 시작되는 데스크톱 응용 프로그램에 영향을 미치지 않습니다. 자세한 내용은 HostProtectionAttribute 클래스나 SQL Server 프로그래밍 및 호스트 보호 특성을 참조하십시오.

예제

다음 예제에서는 UInt32 형식의 변수를 문자열로 변환하고, 그 반대로도 변환합니다.

'This data type is not supported in Visual Basic.
uint myUInt32 = 967299;
string myUInt32String = "1345556";
Console.WriteLine(TypeDescriptor.GetConverter(myUInt32).ConvertTo(myUInt32, typeof(string))); 
Console.WriteLine(TypeDescriptor.GetConverter(myUInt32).ConvertFrom(myUInt32String));    
unsigned int myUInt32(967299);
String^ myUInt32String = "1345556";
Console::WriteLine( TypeDescriptor::GetConverter( myUInt32 )->ConvertTo( myUInt32, String::typeid ) );
Console::WriteLine( TypeDescriptor::GetConverter( myUInt32 )->ConvertFrom( myUInt32String ) );
int myUInt32 = 967299;
String myUInt32String = "1345556";
Console.WriteLine(TypeDescriptor.GetConverter((UInt32)myUInt32).
    ConvertTo((UInt32)myUInt32, String.class.ToType()));
Console.WriteLine(TypeDescriptor.GetConverter((UInt32)myUInt32).
    ConvertFrom(myUInt32String));

상속 계층 구조

System.Object
   System.ComponentModel.TypeConverter
     System.ComponentModel.BaseNumberConverter
      System.ComponentModel.UInt32Converter

스레드로부터의 안전성

이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

UInt32Converter 멤버
System.ComponentModel 네임스페이스