Does reflection in C# offer a way to determine if some given System.Type type models some interface?
public interface IMyInterface {}
public class MyType : IMyInterface {}
// should yield 'true'
typeof(MyType)./* ????? */MODELS_INTERFACE(IMyInterface);
I need to generate a class using Reflection.Emit that implements the following interface.
public interface IObject
{
T Get<T>(string propertyName);
}
Does anyone have an example of how I would emit the following as a simple test …
I am trying implement the Data transformation using Reflection1 example in my code.
The GetSourceValue function has a switch comparing various types, but I want to remove these types and properties and have GetSourceValue get the value of the property …