Phill,
You would need to use Type.GetNestedTypes() to get any Enums (and other
types) that you may have nested inside another type.
FWIW: I rarely nest Enums inside of another type, rather I place them at
file scope either in with the primary type that uses them or in their own
file. Something like:
---x--- class1.vb ---x---
Public Enum Enum1
Value1
End Enum
Public Class Class1
...
End Class
---x---
---x--- Enum2.vb ---x---
Public Enum Enum2
Value1
End Enum
---x---
---x--- AnotherType.vb ---x---
Public Class AnotherType
...
End Class
---x---
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Phill. W" <P.A.Ward@o-p-e-n-.-a-c-.-u-k> wrote in message
news:dl**********@yarrow.open.ac.uk...
| "Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
| news:Ow**************@TK2MSFTNGP10.phx.gbl...
| > "Phill. W" <P.A.Ward@o-p-e-n-.-a-c-.-u-k> schrieb:
| > > Does anyone happen to have a snippet of [VB 2003] code that,
| > > for a given Type, produces a list of [all] the properties, methods,
| > > constructors, and so on for that Class?
| >
| > I do not have such a snippet, but creatint such a snippet should not be
| that
| > hard when using the 'Type' class and its methods.
|
| Herfried,
|
| You're right; it's /not/ that bad - at least up to a point.
| I've successfully iterated all my constructors, methods and properties
| (using the fairly obvious GetConstructors, GetMethods, GetProperties),
| but how do I pull out any Enum's my class might expose?
|
| TIA,
| Phill W.
|
|