I have the following Enum:
public enum ContentKey {
Menu = 0,
Article = 1,
Topic = 2
};
When I use the Enum I have been doing the following:
((int)ContentKey.Topic).ToString("D2")
Is there some way that I could create an extension to the Enum so I didn’t have to code the above?
You can use extension methods:
Usage: