IsDBNull Method

DbDataRecord.IsDBNull Method (Int32)


Used to indicate nonexistent values.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

public abstract bool IsDBNull(
	int i


Type: System.Int32

The column ordinal.

Return Value

Type: System.Boolean

true if the specified column is equivalent to DBNull; otherwise false.

Call this method to check for null column values before calling the typed get methods (for example, GetByte, GetChar, and so on) to avoid raising an error.

.NET Framework
Available since 1.1
Return to top
© 2016 Microsoft