using System;
public class Program
{
public enum Foo
Foo,
Bar,
Baz
}
public static void Main()
Foo somevalue = Foo.Foo;
Console.WriteLine(GetString(someValue));
public string GetString(Foo someValue)
if (someValue == Foo.Foo)
return "Foo";
else if (someValue == Foo.Bar)
return "Bar";
else if (someValue == Foo.Baz)
return "Baz";