Marc said:
In my project, I need to create an Enum of a list of files and create a
property from my enum at runtime.
[IMHO] No; you don't.
There are plenty of ways of doing .. whatever it is you're actually trying
to achieve .. without creating new Types at run-time. Whilst it's /ever/
so clever that VB can do this, it's a Pain in the Proverbial to try and
work out what happened when it [inevitably] goes wrong.
Since you're working with files, I'd suggest a property that is indexed by
/file name/ as a starting point, probably derived from some sort of
collection base class so that you can iterate through them.
HTH,
Phill W.