vendredi 9 juin 2017

Create instance of exact copy of class but as a different type without its static constructor

I have a class A that has a static constructor

public partial class A : ABase
{
    static A()
    {
    }
}

A has a lot of other methods, properties, it is a partial class, the source is in several other files.

Is it possible to create exactly the same class without the static constructor as new type at runtime with reflection and create an instance of it?





Aucun commentaire:

Enregistrer un commentaire