String.GetTypeCode メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Dim instance As String Dim returnValue As TypeCode returnValue = instance.GetTypeCode
列挙型定数 TypeCode.String。

String 型の TypeCode 列挙定数を表示するコード例を次に示します。
' 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. '
// Sample for String.GetTypeCode() using System; class Sample { public static void Main() { String str = "abc"; TypeCode tc = str.GetTypeCode(); Console.WriteLine("The type code for '{0}' is {1}, which represents {2}.", str, tc.ToString("D"), tc.ToString("F")); } } /* This example produces the following results: The type code for 'abc' is 18, which represents String. */
// Sample for String.GetTypeCode() using namespace System; int main() { String^ str = "abc"; TypeCode tc = str->GetTypeCode(); Console::WriteLine( "The type code for '{0}' is {1}, which represents {2}.", str, tc.ToString( "D" ), tc.ToString( "F" ) ); } /* This example produces the following results: The type code for 'abc' is 18, which represents String. */
// Sample for String.GetTypeCode() import System.*; class Sample { public static void main(String[] args) { String str = "abc"; TypeCode tc = str.GetTypeCode(); Console.WriteLine("The type code for '{0}' is {1}, which represents " + "{2}.", str, tc.ToString("D"), tc.ToString("F")); } //main } //Sample /* This example produces the following results: The type code for 'abc' is 18, which represents String. */

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- String.GetTypeCode メソッドのページへのリンク