public enum num
        {
            一 = 1,
            二 = 2,
            三 = 3,
            四 = 4,
            五 = 5,
            六 = 6,
            七 = 7,
            八 = 8,
            九 = 9,
            十 = 10
        }

int inputNum = 3;

string test = Enum.GetName(typeof(num), inputNum)

 

예) string test = Enum.GetName(typeof(num), 3)  

 - Console.WriteLine(test);    =>    "三";

 

+ Recent posts