String.GetTypeCode メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > String.GetTypeCode メソッドの意味・解説 

String.GetTypeCode メソッド

String クラスの TypeCode を返します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function GetTypeCode As
 TypeCode
Dim instance As String
Dim returnValue As TypeCode

returnValue = instance.GetTypeCode
public TypeCode GetTypeCode ()
public:
virtual TypeCode GetTypeCode () sealed
public final TypeCode GetTypeCode ()
public final function GetTypeCode () : TypeCode

戻り値
列挙型定数 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.
*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

String.GetTypeCode メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



String.GetTypeCode メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS