String.GetTypeCode Method ()
.NET Framework (current version)
Namespace:
System
Assembly: mscorlib (in mscorlib.dll)
Return to top
Assembly: mscorlib (in mscorlib.dll)
Implements
IConvertible.GetTypeCode()The following example displays the TypeCode enumerated constant for the String type.
' Sample for String.GetTypeCode() Imports System Class Sample Public Shared Sub Main() Dim str As [String] = "abc" Dim tc As TypeCode = str.GetTypeCode() Console.WriteLine("The type code for '{0}' is {1}, which represents {2}.", _ str, tc.ToString("D"), tc.ToString("F")) End Sub 'Main End Class 'Sample ' 'This example produces the following results: 'The type code for 'abc' is 18, which represents String. '
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: