JDYoder Posted July 25, 2005 Posted July 25, 2005 I don't suppose this is possible in VB.NET, is it? Quote
IngisKahn Posted July 25, 2005 Posted July 25, 2005 An enum is just a list of consts, why would you need to nest them? Quote "Who is John Galt?"
Jaco Posted July 25, 2005 Posted July 25, 2005 I don't suppose this is possible in VB.NET' date=' is it?[/quote'] No, but I suspect that what you might want is just to nest classes to get the desired qualification: e.g., class A class B enum C ... So that the enum is referenced as A.B.C ... ?? Quote
JDYoder Posted July 26, 2005 Author Posted July 26, 2005 >> An enum is just a list of consts, why would you need to nest them? For easy categorizing. Jaco -- Yeah, for something like that. I wondered if I'd have to do it that way with classes, so I'll just do that. Thanks. Quote
IngisKahn Posted July 26, 2005 Posted July 26, 2005 Nesting namespaces would also be an option. Quote "Who is John Galt?"
Joe Mamma Posted July 26, 2005 Posted July 26, 2005 >> An enum is just a list of consts, why would you need to nest them? For easy categorizing. What are you trying to model? Sets of enums? Sets are one thing missing from the .Net framework but there is an implementation from preilly's C# cookbook here. Look at chapter 10. recipe 10.8 Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
SkeeZoe Posted July 30, 2012 Posted July 30, 2012 Did you mean retrieving the full nested string name of an enum (e.g. System.Tools.Enums)? Try This: Dim x as System.Tools.SomeEnums = System.Tools.SomeEnums.FartKnocker Dim y as String = GetType(x).ToString Where: Enum SomeEnums FartKnocker = 1 JabberJaw = 2 None = 0 End Enum Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.