T
Tony
Hello!
Here I have a code snippet. I read a book and the book says the following.
"When you want to set the value of a column to a null value, don't use the
Null keyword from you programming language. The .NET framework includes a
class in the System.namespace called DBNull. To set the value of a column in
a DataRow to a null value use the value property of the DBNull class as
shown here."
DataRow row = tbl.Rows.Find("Test");
row["CompanyName"] =DBNull.Value;
Now what could the reason be not to use the null keyword from C# instead of
the DBNull class ?
//Tony
Here I have a code snippet. I read a book and the book says the following.
"When you want to set the value of a column to a null value, don't use the
Null keyword from you programming language. The .NET framework includes a
class in the System.namespace called DBNull. To set the value of a column in
a DataRow to a null value use the value property of the DBNull class as
shown here."
DataRow row = tbl.Rows.Find("Test");
row["CompanyName"] =DBNull.Value;
Now what could the reason be not to use the null keyword from C# instead of
the DBNull class ?
//Tony