DataReaderExtensions.GetDataTypeName(DbDataReader, String) 方法

定义

获取指定列的数据类型的名称。Gets name of the data type of the specified column.

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ GetDataTypeName(System::Data::Common::DbDataReader ^ reader, System::String ^ name);
public static string GetDataTypeName (this System.Data.Common.DbDataReader reader, string name);
static member GetDataTypeName : System.Data.Common.DbDataReader * string -> string
<Extension()>
Public Function GetDataTypeName (reader As DbDataReader, name As String) As String

参数

reader
DbDataReader

要从中获取列类型名称的数据读取器。The data reader to get the column type name from.

name
String

列的名称。The name of the column.

返回

String

数据类型的名称。The name of the data type.

例外

指定的名称不是有效的列名。The name specified is not a valid column name.

适用于

另请参阅