Gets a value indicating whether the specified column contains a null value.
Gets a value indicating whether the column at the specified index contains a null value.
[Visual Basic] Overloads Public Function IsNull(Integer) As Boolean
[C#] public bool IsNull(int);
[C++] public: bool IsNull(int);
[JScript] public function IsNull(int) : Boolean;
Gets a value indicating whether the named column contains a null value.
[Visual Basic] Overloads Public Function IsNull(String) As Boolean
[C#] public bool IsNull(String);
[C++] public: bool IsNull(String*);
[JScript] public function IsNull(String) : Boolean;
Gets a value indicating whether the specified DataColumn contains a null value.
[Visual Basic] Overloads Public Function IsNull(DataColumn) As Boolean
[C#] public bool IsNull(DataColumn);
[C++] public: bool IsNull(DataColumn*);
[JScript] public function IsNull(DataColumn) : Boolean;
The following example prints each column of each row in each table of a DataSet. If the row is set to a null value, the value is not printed.
Note This example shows how to use one of the overloaded versions of IsNull. For other examples that may be available, see the individual overload topics.
[Visual Basic]
Private Sub PrintRows(ds As DataSet) Dim t As DataTable Dim dc As DataColumn Dim r As DataRow For Each t In ds.Tables For Each r In t.Rows For Each c In t.Columns If Not r.IsNull(c) Then Console.WriteLine(r(c)).ToString Next c Next r Next t End Sub