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
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za