Contents tagged with Reflection
-
Moq, Callbacks and Out parameters: a particularly tricky edge case
In my current project we’re using Moq as our mocking framework for unit testing. It’s a very nice package – very simple, very intuitive for someone who has his wrapped around basic mocking concepts, … more
-
Reflecting over an Event
A coworker (Hey, Evgeny!) came to me with a puzzler today. He has an object that exposes an event, and he wants to know whether he's already subscribed to that event. Two things immediately came … more
-
Crossing the line - Reflection and Reality
When we're working Reflection, we tend to think in different terms than we do when we're actually calling methods. There's an extra level of abstraction in everything we do. Translating between these … more
-
From Accessors to Properties
For various debugging processes, I find myself needing to find several bits of runtime information for my properties. This means I want to get the property's PropertyInfo object by Reflection when … more
-
Non-generic default values in C#? Why not?!
A relatively obscure new keyword in C# 2.0 is the default(T) keyword. It's shorthand for checking if the given generic parameter T is a value type or reference type. If it's a reference type, it … more
-
System.Reflection.Omit
In TechEd Israel 2006, I listened to Roy Osherove's excellent talk on the new reflection features in .NET 2.0 - a great assortment of topics on things ranging from DynamicMethods to the … more