DataRecordExtensionToDictionary Method |
Creates a new dictionary whose key value pairs represent the fields of the given IDataRecord together with their values.
If the record is null, an empty dictionary is created.
Namespace:
TB.ComponentModel
Assembly:
UniversalTypeConverter (in UniversalTypeConverter.dll) Version: 2.0.0
Syntax public static Dictionary<string, Object> ToDictionary(
this IDataRecord record
)
Parameters
- record
- Type: System.DataIDataRecord
The IDataRecord whose fields are added to the new dictionary.
Return Value
Type:
DictionaryString,
Object
A new dictionary which contains the fields of
record together with their values.
If
record is null, an empty dictionary is returned.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IDataRecord. 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