A collection of useful type extensions provided by N4Works.com for .net
USAGE:
IDataReader extension:
using (var dataReader = ExecuteReader(command))
{
IPerson person = new Person();
person.Name = dataReader.GetFieldValue<string>("PersonName");
return person;
}
Enum extension:
public enum GameTypes {
[EnumValue("Role Playing Game")]
RPG,
[EnumValue("First Person Shooter")]
FPS,
Action
}
var typeDescription = GameTypes.RPG.GetValue();