Answers for "c# what does enum to string return"

4

c# string enum

public static class Status
{
    public const string Awesome = "Awesome";
    public const string Cool = "Cool";
}
//Not an enum but has a similar effect without needing to convert ints
Posted by: Guest on November-12-2020
0

chsarp enum to string

class Program  
{  
    static void Main(string[] args)  
    {  
        Enum wkday = Weekday.Friday;  
        Console.WriteLine("Enum string is '{0}'", wkday.ToString());  
        Console.ReadKey();  
    }  
          
    // Enum   
    public enum Weekday  
    {  
        Monday = 0, Tuesday = 1, Wednesday = 2, Thursday = 4, Friday = 5, Saturday = 6, Sunday = 7  
    }  
}
Posted by: Guest on November-16-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language