It looks to me to be just an outdated overview doc page. The reference docs
on TypeBuilder show a more generic DefineNestedType method that will
probably do the trick. Haven't done it myself, but something along these
lines is probably worth taking experimenting with:
<codeFrag>
TypeBuilder tb = /* the top level type you're working on */;
// Define a nested enum called Colors.
//
TypeBuilder tbColors = tb.DefineNestedType("Colors",
TypeAttributes.NestedPublic, Type.GetType("System.Enum"));
</codeFrag>
You might need to play with the attributes parameter a bit.
If get it working, please follow up here with the specifics for the
archives...
-Mike
http://staff.develop.com/woodring
http://www.develop.com/devresources
----- Original Message -----
From: "Michał Jaeschke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 12:37 AM
Subject: [ADVANCED-DOTNET] DefineNestedEnum :)
> What is wrong with TypeBuilder, exactly why TypeBuilder hasn't method
> DefineNestedEnum. Mticrosoft forgot???. In msdn "....Nested enums are
> defined using TypeBuilder.DefineNestedEnum....". ya, sure. How to omit
gap?
>
> You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.