I am searching a solution to get the complete String of an enum.
Example:
Public Enum Color { Red = 1, Blue = 2 } Color color = Color.Red; /
You can use extension methods.
public static class EnumExtension { public static string ToCompleteName(this Color c) { return "Color." + c.ToString(); } }
Now method below will return "Color.Red".
color.ToCompleteName();
http://msdn.microsoft.com/en-us/library/vstudio/bb383977.aspx