tagged [reflection.emit]
Creating dynamic type from TypeBuilder with a base class and additional fields generates an exception
Creating dynamic type from TypeBuilder with a base class and additional fields generates an exception I am trying to create a dynamic type based on an existing type that contains only public fields. T...
- Modified
- 27 Aug at 13:45
Why is Calli Faster Than a Delegate Call?
Why is Calli Faster Than a Delegate Call? I was playing around with Reflection.Emit and found about about the little-used [EmitCalli](http://msdn.microsoft.com/en-us/library/system.reflection.emit.ilg...
- Modified
- 20 Jun at 09:12
Creating method dynamically, and executing it
Creating method dynamically, and executing it I want to define few `static` methods in C# , and generate IL code as byte array, from one of these methods, selected at runtime (on client), and send the...
- Modified
- 19 Nov at 14:6
Generate dynamic method to set a field of a struct instead of using reflection
Generate dynamic method to set a field of a struct instead of using reflection Let's say I have the following code which update a field of a `struct` using reflection. Since the struct instance is cop...
- Modified
- 23 May at 12:26
How to emit explicit interface implementation using reflection.emit?
How to emit explicit interface implementation using reflection.emit? Observe the following simple source code: ``` using System; using System.Linq.Expressions; using System.Reflection; using System.Re...
- Modified
- 30 Nov at 22:56
ILGenerator catching exceptions doesn't work
ILGenerator catching exceptions doesn't work I'm generating wrappers for types by using `System.Reflection.Emit`. At one point it's possible that the original object is throwing a error on access ( `F...
- Modified
- 13 Mar at 16:51
Curiosity: Why does Expression<...> when compiled run faster than a minimal DynamicMethod?
Curiosity: Why does Expression when compiled run faster than a minimal DynamicMethod? I'm currently doing some last-measure optimizations, mostly for fun and learning, and discovered something that le...
- Modified
- 18 Aug at 21:39
Modifying Existing .NET Assemblies
Modifying Existing .NET Assemblies Is there a way to modify existing .NET assemblies without resorting to 3rd party tools? I know that [PostSharp](http://www.postsharp.org/) makes this possible but I ...
- Modified
- 22 Jul at 13:48
Using Reflection.Emit to emit a "using (x) { ... }" block?
Using Reflection.Emit to emit a "using (x) { ... }" block? I'm trying to use Reflection.Emit in C# to emit a `using (x) { ... }` block. At the point I am in code, I need to take the current top of the...
- Modified
- 8 Jun at 21:17
Reflect.Emit Dynamic Type Memory Blowup
Reflect.Emit Dynamic Type Memory Blowup Using C# 3.5 I am trying to generate dynamic types at runtime using reflection emit. I used the [Dynamic Query Library](http://msdn2.microsoft.com/en-us/vcsharp...
- Modified
- 23 Mar at 21:36