Is it possible to dynamically make an interface in C#, (maybe by using reflection?).
I want to create this interface based on a dictionary with keys and values. Each key would be a field or a property of the newly made interface. There are potentially hundreds of dictionaries like these and I'm trying to find a way to do this dynamically, doesn't matter if there are hundreds of ICustomInterfaceSomeName.cs
files generated.
I checked this link about T4 text templates but I can't figure out how to apply it to my issue. I also checked this link but it doesn't really apply to what I am trying to achieve. I see a lot of questions about how to implement an interface dynamically but not how to create it from scratch with some data.
Can someone point me in the right direction or give me some pointers?
Intended usage:
What I'm trying to do is getting a final object that implements the said interfaces to have intellisense with the dictionaries. This is related to this question. The point is making objects dynamically that can implement these interfaces in order to have intellisense while writing code.
I am guessing this would require to build the unfinished code for the interfaces to be generated and then have intellisense.
If the question is a duplicate or isn't clear, don't hesitate to comment so I can remedy it