I have an eum type with 5 members. Is it possible to tell intellisense to order them the way I want?
public enum numbers
{
zero,
one,
two,
three,
four
}
Intelisense shows (in alpha):
four
one
three
two
zero
I have an eum type with 5 members. Is it possible to tell intellisense to order them the way I want?
public enum numbers
{
zero,
one,
two,
three,
four
}
Intelisense shows (in alpha):
four
one
three
two
zero
No you can't as far as I know. Intellisense orders them alphabetically.
I think the only way to do that would be to do something like
public enum numbers
{
num_00,
num_01,
num_02,
num_03,
num_04
}
well if you use this kind of declaration for enum intellisense will sort by the first character
by diffrewnt kind of declartion i mean you can start the enum like _0 _1 _2 like that where _ will have the same previlage and then 0 1 2 etc will be used to reorder it.
No you cant. But the Visual Studio team has considered the suggestion even though not exactly the way you would want it. But hey, its a start.
See the Microsoft connect response here http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=419602
I have added your requirement as a comment on the site.