Type.GetTypeCode 메서드

지정된 Type의 내부 형식 코드를 가져옵니다.

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

구문

‘선언
Public Shared Function GetTypeCode ( _
    type As Type _
) As TypeCode
‘사용 방법
Dim type As Type
Dim returnValue As TypeCode

returnValue = Type.GetTypeCode(type)
public static TypeCode GetTypeCode (
    Type type
)
public:
static TypeCode GetTypeCode (
    Type^ type
)
public static TypeCode GetTypeCode (
    Type type
)
public static function GetTypeCode (
    type : Type
) : TypeCode

매개 변수

  • type
    내부 형식 코드를 가져올 Type입니다.

반환 값

내부 형식의 TypeCode 값입니다.

예제

' Creates an object of 'Type' class.
Dim myType1 As Type = Type.GetType("System.Int32")
' Get the 'TypeCode' of the 'Type' class object created above.
Dim myTypeCode As TypeCode = Type.GetTypeCode(myType1)
Console.WriteLine("TypeCode is: {0}", myTypeCode)
// Create an object of 'Type' class.
Type myType1 = Type.GetType("System.Int32");
// Get the 'TypeCode' of the 'Type' class object created above.
TypeCode myTypeCode = Type.GetTypeCode(myType1);
Console.WriteLine("TypeCode is: {0}",myTypeCode);
// Create an object of 'Type' class.
Type^ myType1 = Type::GetType( "System.Int32" );

// Get the 'TypeCode' of the 'Type' class object created above.
TypeCode myTypeCode = Type::GetTypeCode( myType1 );
Console::WriteLine( "TypeCode is: {0}", myTypeCode );
// Create an object of 'Type' class.
Type myType1 = Type.GetType("System.Int32");
// Get the 'TypeCode' of the 'Type' class object created above.
TypeCode myTypeCode = Type.GetTypeCode(myType1);
Console.WriteLine("TypeCode is: {0}", myTypeCode);

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, 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에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

Type 클래스
Type 멤버
System 네임스페이스
TypeCode