vendredi 18 septembre 2020

Store class declaring type in a variable [duplicate]

Is there any way to do something like this ?

class Program
{
    static void Main(string[] args)
    {
        var decType = Program;
    }
}

To be able to write a thing like that:

DataContext.Set<TheClass>() 




Aucun commentaire:

Enregistrer un commentaire