How to have enum values with spaces? [duplicate]

No that’s not possible, but you can attach attributes to enum members. The EnumMemberAttribute is designed exactly for the purpose you described. public enum PersonGender { Unknown = 0, Male = 1, Female = 2, Intersex = 3, Indeterminate = 3, [EnumMember(Value = “Not Stated”)] NonStated = 9, [EnumMember(Value = “Inadequately Described”)] InadequatelyDescribed = 9 … Read more

HttpUtility.UrlEncode in console application

System.Web is there, but seems Visual Studio doesn’t sort by name by default. You’ll need to click Component name column to get that list sorted. I was able to run this code: Console.WriteLine(System.Web.HttpUtility.UrlEncode(” “)); // + Just adding a System.Web reference, without System.Web.Extensions. Also, You should replace your target framework from .NET Framework 4 Client … Read more

The item was specified more than once in the “Resources” parameter. Duplicate items are not supported by the “Resources” parameter

Easy! Right-click your project and select “Unload Project” Right-click again and “Edit your_project.csproj” Search for the duplicate files mentioned in the error message and remove them. Save and close. Right-click to choose “Reload Project” view image

Is .( ever legal in C# or VB.Net?

The only places that . appears in the grammar are: real-literal: decimal-digits . decimal-digits … . decimal-digits … namespace-or-type-name: namespace-or-type-name . identifier … member-access: primary-expression . identifier … predefined-type . identifier … qualified-alias-member . identifier … base-access: base . identifier unbound-type-name: unbound-type-name . identifier qualified-identifier: qualified-identifier . identifier member-name: interface-type . identifier indexer-declarator: type interface-type … Read more