mercredi 28 janvier 2015

How to get typeof generic interface

i am having



interface ITestInterface<TSource,TDestination>


i want the



void TestFunction(Type t1, Type t2)
{
var x = typeof(ITestInterface<t1, t2>)
}


what is difference between genericMethod.Invoke(this, null) and calling method direct i.e TestFunction(typeof(Emp), typeof(Dept)). so that i can change function to



void TestFunction<TSource, TDestination>()
{
var x = typeof(ITestInterface<TSource, TDestination>)
}





Aucun commentaire:

Enregistrer un commentaire