¡@

Home 

c# Programming Glossary: opcodes.callvirt

Anyone know a quick way to get to custom attributes on an enum value?

http://stackoverflow.com/questions/17772/anyone-know-a-quick-way-to-get-to-custom-attributes-on-an-enum-value

OpCodes.Ldarg_0 calls the getter ilGenerator.EmitCall OpCodes.Callvirt propInfo.GetGetMethod null creates code for handling the return..

Get an IDataReader from a typed List

http://stackoverflow.com/questions/2258310/get-an-idatareader-from-a-typed-list

propertyInfo.PropertyType generator.EmitCall OpCodes.Callvirt setMethod null generator.Emit OpCodes.Ret Create the delegate.. propertyInfo.DeclaringType generator.EmitCall OpCodes.Callvirt getMethod null if propertyInfo.PropertyType.IsClass generator.Emit..

Comparing 2 objects and retrieve a list of fields with different values

http://stackoverflow.com/questions/3060382/comparing-2-objects-and-retrieve-a-list-of-fields-with-different-values

T .IsValueType OpCode callType isValueType OpCodes.Call OpCodes.Callvirt var add typeof List string .GetMethod Add foreach var prop.. il.EmitCall callType prop.GetGetMethod null il.EmitCall OpCodes.Callvirt typeof EqualityComparer .MakeGenericType prop.PropertyType .GetMethod.. OpCodes.Dup il.Emit OpCodes.Ldstr prop.Name il.EmitCall OpCodes.Callvirt add null il.MarkLabel next il.Emit OpCodes.Ret getDeltas Func..

Look if a method is called inside a method using reflection

http://stackoverflow.com/questions/5741350/look-if-a-method-is-called-inside-a-method-using-reflection

image .Body.Instructions.Cast Instruction .Any i i.OpCode OpCodes.Callvirt i.Operand mytargetmethod Call Tree Search Here is a working..

Looking for a fast and easy way to coalesce all properties on a POCO

http://stackoverflow.com/questions/7422861/looking-for-a-fast-and-easy-way-to-coalesce-all-properties-on-a-poco

target il.Emit OpCodes.Ldarg_0 target source il.EmitCall OpCodes.Callvirt prop.GetGetMethod null target value il.Emit OpCodes.Dup target.. il.MarkLabel nonNull incoming target value il.EmitCall OpCodes.Callvirt prop.GetSetMethod null nix il.MarkLabel end incoming nix il.Emit..

How can I write a generic container class that implements a given interface in C#?

http://stackoverflow.com/questions/847809/how-can-i-write-a-generic-container-class-that-implements-a-given-interface-in-c

OpCodes.Ldarg_0 il.Emit OpCodes.Ldfld fld il.EmitCall OpCodes.Callvirt typeof IEnumerable T .GetMethod GetEnumerator null il.Emit.. doItem il.Emit OpCodes.Ldloc iter il.EmitCall OpCodes.Callvirt typeof IEnumerator T .GetProperty Current .GetGetMethod null.. OpCodes.Ldarg_S OpCodes.Ldarg i 1 break il.EmitCall OpCodes.Callvirt method null progress the iterator il.MarkLabel loop il.Emit..