DataReaderExtensions.GetString(DbDataReader, String) 方法
定义
public:
[System::Runtime::CompilerServices::Extension]
static System::String ^ GetString(System::Data::Common::DbDataReader ^ reader, System::String ^ name);
public static string GetString (this System.Data.Common.DbDataReader reader, string name);
static member GetString : System.Data.Common.DbDataReader * string -> string
<Extension()>
Public Function GetString (reader As DbDataReader, name As String) As String
参数
- reader
- DbDataReader
要从中获取列值的数据读取器。The data reader to get the column value from.
- name
- String
列的名称。The name of the column.
返回
指定列的值。The value of the specified column.
例外
指定的名称不是有效的列名。The name specified is not a valid column name.
指定的强制转换无效。The specified cast is not valid.