FasterFlect - Fast & Easy .Net Reflection
I don't know how many people use Reflection on .Net, nor how many of us who use Reflection on .net know FasterFlect.
But I'll tell you off the bat, FasterFlect is the fastest reflection library out there, faster than .Net's own dynamic implementation.
With that told, FasterFlect is also very easy to use, here is an example:
object toReflect = new List<int>();
toReflect.Call("Add", 1);
var method = toReflect.GetDelegateForCallMethod("Add", typeof(int));
method(2);
List<int> realList = (List<int>)toReflect;
System.Console.WriteLine(realList[0]); // Prints: 1
System.Console.WriteLine(realList[1]); // Prints: 2
Written by Marcel Valdez
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Reflection
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#