1

I have an enum like this:

public enum MyEnum
{
    people1,
    people2
}

I want to override or overload ToString() method. For example in the following code, variable s becomes "This is people 1".

string s=MyEnum.people1.ToString(); //I want s to become "This is people 1"

I don't want to create another method with extension method, I want to override or overload ToString method.

Palle Due
  • 4,918
  • 3
  • 19
  • 31
mohammad
  • 1,187
  • 2
  • 14
  • 27

0 Answers0