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

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

Decimal.GetTypeCode メソッド

Decimal 値型の TypeCode を返します

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

Public Function GetTypeCode As
 TypeCode
Dim instance As Decimal
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.Decimal。

使用例使用例

GetTypeCode メソッド使用してDecimal の値の型コード返す例を次に示します

' Example of the Decimal.GetTypeCode method. 
Imports System
Imports Microsoft.VisualBasic

Module DecimalGetTypeCodeDemo
    
    Sub Main( )
        Console.WriteLine( "This example of the "
 & _
            "Decimal.GetTypeCode( ) " & vbCrLf
 & "method " & _
            "generates the following output." &
 vbCrLf )

        ' Create a Decimal object and get its type code.
        Dim aDecimal    As Decimal
  = New Decimal( 1.0 )
        Dim typCode     As TypeCode = aDecimal.GetTypeCode(
 )

        Console.WriteLine( "Type Code:      ""{0}""",
 typCode )
        Console.WriteLine( "Numeric value:  {0}",
 CInt( typCode ) )
    End Sub
End Module 

' This example of the Decimal.GetTypeCode( )
' method generates the following output.
' 
' Type Code:      "Decimal"
' Numeric value:  15
// Example of the decimal.GetTypeCode method. 
using System;

class DecimalGetTypeCodeDemo
{
    public static void Main(
 )
    {
        Console.WriteLine( "This example of the " +
            "decimal.GetTypeCode( ) \nmethod " +
            "generates the following output.\n" );

        // Create a decimal object and get its type code.
        decimal aDecimal = new decimal( 1.0 );
        TypeCode typCode = aDecimal.GetTypeCode( );

        Console.WriteLine( "Type Code:      \"{0}\"", typCode
 );
        Console.WriteLine( "Numeric value:  {0}", (int)typCode
 );
    }
}

/*
This example of the decimal.GetTypeCode( )
method generates the following output.

Type Code:      "Decimal"
Numeric value:  15
*/
// Example of the Decimal::GetTypeCode method. 
using namespace System;
int main()
{
   Console::WriteLine( "This example of the "
   "Decimal::GetTypeCode( ) \nmethod "
   "generates the following output.\n" );
   
   // Create a Decimal object and get its type code.
   Decimal aDecimal = Decimal(1.0);
   TypeCode typCode = aDecimal.GetTypeCode();
   Console::WriteLine( "Type Code:      \"{0}\"", typCode );
   Console::WriteLine( "Numeric value:  {0}", (int)typCode
 );
}

/*
This example of the Decimal::GetTypeCode( )
method generates the following output.

Type Code:      "Decimal"
Numeric value:  15
*/
// Example of the decimal.GetTypeCode method. 
import System.*;

class DecimalGetTypeCodeDemo
{
    public static void main(String[]
 args)
    {
        Console.WriteLine("This example of the " 
            + "decimal.GetTypeCode( ) \nmethod " 
            + "generates the following output.\n");

        // Create a decimal object and get its type code.
        System.Decimal aDecimal = new System.Decimal(1.0);
        TypeCode typCode = aDecimal.GetTypeCode();

        Console.WriteLine("Type Code:      \"{0}\"", typCode);
        Console.WriteLine("Numeric value:  {0}",
            System.Convert.ToString((int)typCode));
    } //main
} //DecimalGetTypeCodeDemo

/*
This example of the decimal.GetTypeCode( )
method generates the following output.

Type Code:      "Decimal"
Numeric value:  15
*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS