vendredi 28 octobre 2016

is type derived from DataContext?

Given:

private T SomeFunction<T>(T obj)

Is it possible to test if the passed object type T is derived from a DataContext?

EG this returned object would test for True:

using(var db = new DBContext())
{
    return db.Table.First();
}





Aucun commentaire:

Enregistrer un commentaire