My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

In .NET reflection is slow... well, kinda slow. If you need access to the members of an arbitrary type, with the type and member-names known only at runtime - then it is frankly hard (especially for DLR types). This library makes such access easy and fast.

An introduction to the reasons behind fast-member can be found on my blog; example usage is simply:

var accessor = TypeAccessor.Create(type); 
string propName = // something known only at runtime 
while( /* some loop of data */ ) { 
    accessor[obj, propName] = rowValue; 
}

or

// obj could be static or DLR 
var wrapped = ObjectAccessor.Create(obj); 
string propName = // something known only at runtime 
Console.WriteLine(wrapped[propName]);
Powered by Google Project Hosting