Extensions.GetStringOrNull(DbDataReader, String) Method
Gets the value of the specified column as a String, or null (Nothing in Visual Basic).
Namespace: DbExtensions
Assembly: DbExtensions.dll
Overloads
| Name | Description |
|---|---|
| GetStringOrNull(DbDataReader, Int32) | Gets the value of the specified column as a String, or null (Nothing in Visual Basic). |
| GetStringOrNull(DbDataReader, String) | Gets the value of the specified column as a String, or null (Nothing in Visual Basic). |
Syntax
public static string? GetStringOrNull(
this DbDataReader reader,
string name
)
Parameters
reader DbDataReader
The data reader.
name String
The name of the column to find.
Return Value
String
The value of the column.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type DbDataReader. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).