jeudi 18 août 2016

Use reflection/generics to generate wrapper class

I'd like to create a wrapper class dynamically, such that for every desired class (probably underneath a certain namespace like DBO) I'll get an appropriate class like this:

public class [ClassName]Wrapper{
    public [ClassName] [ClassName] { get; set; }
}

I'm fairly new to reflection and I've never built a class at runtime. Code to do this would be great, but even pointing out excellent resources to study up on the tools used to do this would be a great move forward for me.

Thanks!





Aucun commentaire:

Enregistrer un commentaire