top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How can I internationalize strings representing C# enum values?

+4 votes
404 views
How can I internationalize strings representing C# enum values?
posted Sep 18, 2014 by Khusboo

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+3 votes

You cant directly initialize string to Enum check this sample

using System;

public class Test
{
    public static void Main()
    {
        Console.WriteLine(Convert.ToString(name.test));
        Console.WriteLine(Convert.ToInt32(name.test));
        // your code goes here
    }

    public enum name
    {
        test=1
    }
}
answer Feb 3, 2015 by Balamurugan Kn
...