DataTypeInfo.TypeName プロパティ

定義

データ型名を返します。 このフィールドは読み取り専用です。

public:
 property System::String ^ TypeName { System::String ^ get(); };
public string TypeName { get; }
member this.TypeName : string
Public ReadOnly Property TypeName As String

プロパティ値

データ型の長い記述を含む文字列です。

以下のコード例はコレクションを反復し、各データ型のTypeEnumNameTypeNameをSQL Server Integration Services(SSIS)で印刷します。

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace DataTypeInfo_Properties  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            //Create the DataTypeInfos collection.  
            DataTypeInfos dataInfos = new Application().DataTypeInfos;  

            //Iterate over the collection, printing the values  
            //of the properties.  
            foreach (DataTypeInfo dInfo in dataInfos)  
            {  
                Console.WriteLine("TypeName: {0}, TypeEnumName: {1}", dInfo.TypeName, dInfo.TypeEnumName);  
                //Console.WriteLine("TypeEnumName   {0}", dInfo.TypeEnumName);  
            }  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace DataTypeInfo_Properties  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            'Create the DataTypeInfos collection.  
            Dim dataInfos As DataTypeInfos =  New Application().DataTypeInfos   

            'Iterate over the collection, printing the values  
            'of the properties.  
            Dim dInfo As DataTypeInfo  
            For Each dInfo In dataInfos  
                Console.WriteLine("TypeName: {0}, TypeEnumName: {1}", dInfo.TypeName, dInfo.TypeEnumName)  
                'Console.WriteLine("TypeEnumName   {0}", dInfo.TypeEnumName);  
            Next  
         End Sub  
    End Class  
End Namespace  

出力例:

TypeName: float, TypeEnumName: DT_R4

TypeName: double-precision-float, TypeEnumName: DT_R8

TypeName: currency, TypeEnumName: DT_CY

TypeName: date, TypeEnumName: DT_DATE

タイプ名:ブール、タイプ枚挙名:DT_BOOL

TypeName: decimal, TypeEnumName: DT_DECIMAL

TypeName: 1バイト符号付き整数、TypeEnumName: DT_I1

TypeName: single-byte unsigned integer, TypeEnumName: DT_UI1

TypeName: 2バイト符号付き整数、TypeEnumName: DT_I2

TypeName: 2-byte unsigned integer, TypeEnumName: DT_UI2

TypeName: 4バイト署名整数、TypeEnumName: DT_I4

TypeName: 4-byte unsigned inte, TypeEnumName: DT_UI4

TypeName: 8バイト署名整数、TypeEnumName: DT_I8

TypeName: 8-byte unsigned inte, TypeEnumName: DT_UI8

TypeName: ファイルタイムスタンプ、TypeEnumName: DT_FILETIME

TypeName: unique identifier, TypeEnumName: DT_GUID

TypeName: byte stream, TypeEnumName: DT_BYTES

TypeName: string, TypeEnumName: DT_STR

TypeName: Unicode文字列、TypeEnumName: DT_WSTR

TypeName: 数値、TypeEnumName: DT_NUMERIC

TypeName: データベース 日付、TypeEnumName: DT_DBDATE

TypeName: データベース時間、TypeEnumName: DT_DBTIME

TypeName: データベースタイムスタンプ、TypeEnumName: DT_DBTIMESTAMP

TypeName: image, TypeEnumName: DT_IMAGE

TypeName: text stream, TypeEnumName: DT_TEXT

TypeName: Unicodeテキストストリーム、TypeEnumName: DT_NTEXT

注釈

データ型の長い名前を返します。 例えば、プロパティはDT_CYの種類に対して通貨を返します。

適用対象