C# Enum To String Using Attributes

There are certain situation we need to have custom string value to a Enum and later need to retrieve the string value. The string value should be independent of the enum constant. The below example will use the system.attribute class to achieve this. Step 1: Declare a Enum public enum GameConsole{    PSP=0,    PS2=1,    XBOX=2,    Nitendo=3}... Continue Reading →

Create a website or blog at WordPress.com

Up ↑