Skip to content

Instantly share code, notes, and snippets.

@miya2000
Created November 14, 2010 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miya2000/675845 to your computer and use it in GitHub Desktop.
Save miya2000/675845 to your computer and use it in GitHub Desktop.
using System;
namespace EnumName.enums
{
public static class Hoge
{
public enum Value
{
Aaa,
Bbb
}
public static String GetName(this Value v)
{
//TODO get from attribute.
return v.ToString();
}
}
}
using System;
namespace EnumName
{
using enums;
using Hoge = enums.Hoge.Value;
class Program
{
static void Main(string[] args)
{
Hoge h = Hoge.Aaa;
Console.WriteLine(h.GetName());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment