本文整理匯總了VB.NET中System.Data.DataRow.IsNull方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET DataRow.IsNull方法的具體用法?VB.NET DataRow.IsNull怎麽用?VB.NET DataRow.IsNull使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Data.DataRow
的用法示例。
在下文中一共展示了DataRow.IsNull方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: PrintRows
Private Sub PrintRows(dataSet As DataSet)
Dim table As DataTable
Dim column As DataColumn
Dim row As DataRow
For Each table In dataSet.Tables
For Each row In table.Rows
For Each column In table.Columns
If Not row.IsNull(column) Then
Console.WriteLine(row(column).ToString())
End If
Next column
Next row
Next table
End Sub
示例2: IsValNull
Private Sub IsValNull()
' Assuming the DataGrid is bound to a DataTable.
Dim table As DataTable = CType(DataGrid1.DataSource, DataTable)
Dim row As DataRow = table.Rows(datagrid1.CurrentCell.RowNumber)
row.BeginEdit
row(1) = System.DBNull.Value
row.EndEdit
row.AcceptChanges
Console.WriteLine(row.IsNull(1))
End Sub
示例3: IsValNull
Private Sub IsValNull()
' Assuming the DataGrid is bound to a DataTable.
Dim table As DataTable = CType(DataGrid1.DataSource, DataTable)
Dim row As DataRow = table.Rows(datagrid1.CurrentCell.RowNumber)
row.BeginEdit
row("FirstName") = System.DBNull.Value
row.EndEdit
row.AcceptChanges
Console.WriteLine(row.IsNull("FirstName"))
End Sub