SqlDataReaderExtensionsGetValueT Method (IDataReader, String, T)

Alterian Email Manager 6.2.3 SDK Help File
Gets the reader value

Namespace:  DMLibrary
Assembly:  DMLibrary (in DMLibrary.dll) Version: 1.0.6340.17420

Syntax
public static T GetValue<T>(
	this IDataReader reader,
	string parameterName,
	T defaultValue = null
)

Parameters

reader
Type: System.DataIDataReader
SqlDataReader where to read from
parameterName
Type: SystemString
Name of the column to look for
defaultValue (Optional)
Type: T
Default value if the column has a null value

Type Parameters

T
Type of the value to get

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDataReader. 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).
See Also