DataReaderExtensions.IsDBNull(DbDataReader, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates whether the column contains nonexistent or missing values.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsDBNull(System::Data::Common::DbDataReader ^ reader, System::String ^ name);
public static bool IsDBNull(this System.Data.Common.DbDataReader reader, string name);
static member IsDBNull : System.Data.Common.DbDataReader * string -> bool
<Extension()>
Public Function IsDBNull (reader As DbDataReader, name As String) As Boolean
Parameters
- reader
- DbDataReader
The data reader to get the column value from.
- name
- String
The name of the column.
Returns
true
if the specified column is equivalent to DBNull; otherwise, false
.
Exceptions
The name specified is not a valid column name.
Remarks
Call this method to check for null column values before calling the typed Get_*_ methods (for example, GetByte, GetChar, and so on) to avoid throwing an exception.
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET