c# Programming Glossary: objtype
Writing C# Plugin System http://stackoverflow.com/questions/1070787/writing-c-sharp-plugin-system .dll foreach var plugin in pluginFiles Type objType null try Assembly.GetExecutingAssembly .GetName .Name MessageBox.Show.. Assembly asm Assembly.Load plugin if asm null objType asm.GetType asm.FullName if objType null if typeof IPlugin.. plugin if asm null objType asm.GetType asm.FullName if objType null if typeof IPlugin .IsAssignableFrom objType MessageBox.Show..
.NET: Unable to cast object to interface it implements http://stackoverflow.com/questions/1596796/net-unable-to-cast-object-to-interface-it-implements cast to the interface object obj Activator.CreateInstance objType Type interfaces obj.GetType .GetInterfaces contains IFrameworkClient..
Posting JSON Data to ASP.NET MVC http://stackoverflow.com/questions/4164114/posting-json-data-to-asp-net-mvc this JavaScriptSerializer serializer string input Type objType var deserializerMethod serializer.GetType .GetMethod Deserialize.. serializer new object serializer input objType serializer.RecursionLimit And tell MVC to use it in your Global.asax..
How to recursively print the values of an object's properties using reflection http://stackoverflow.com/questions/6196413/how-to-recursively-print-the-values-of-an-objects-properties-using-reflection null return string indentString new string ' ' indent Type objType obj.GetType PropertyInfo properties objType.GetProperties foreach.. ' indent Type objType obj.GetType PropertyInfo properties objType.GetProperties foreach PropertyInfo property in properties object.. obj null if property.PropertyType.Assembly objType.Assembly Console.WriteLine 0 1 indentString property.Name PrintProperties..
Fast creation of objects instead of Activator.CreateInstance(type) http://stackoverflow.com/questions/6582259/fast-creation-of-objects-instead-of-activator-createinstancetype code we had. public static Func T CreateInstance T Type objType where T class new var dynMethod new DynamicMethod DM OBJ_FACTORY_.. class new var dynMethod new DynamicMethod DM OBJ_FACTORY_ objType.Name objType null objType ILGenerator ilGen dynMethod.GetILGenerator.. dynMethod new DynamicMethod DM OBJ_FACTORY_ objType.Name objType null objType ILGenerator ilGen dynMethod.GetILGenerator ilGen.Emit..
|