I am writing a package which needs to make some customized phrases (e.g. a bunch of city names) externally accessible. (like a normal enum with name 'MyEnum', when user types in "MyEnum.", all its enumerated members will pop up to let user choose)
I tried enum a bunch of city names as follows, but of course it didn't work.
public enum City
{
Los Angeles,
Santa Francisco,
Houston,
New York
}
I also read some earlier articles about using string attributes on enum fields, but these strings can not pop up for external use.
Any helps? Thanks in advance.
I think its cause an error because a white space.
Try this
public enum City
{
LosAngeles,
SantaFrancisco,
Houston,
NewYork
}