using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace enum_sample
{
class Program
{
public enum MeetingImportance
{ Trivial,Regular,Critical }
static void Main(string[] args)
{
MeetingImportance meet = MeetingImportance.Critical;
int value = (int)MeetingImportance.Critical;
if (meet == MeetingImportance.Trivial)
{
Console.WriteLine("Trivial:{0}",value);
}
else if (meet == MeetingImportance.Regular)
{
Console.WriteLine("Regular:{0}",value);
}
else if (meet == MeetingImportance.Critical)
{
Console.WriteLine("Critical:{0}",value);
}
}
}
}
Downlaod Enum Source Code
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace enum_sample
{
class Program
{
public enum MeetingImportance
{ Trivial,Regular,Critical }
static void Main(string[] args)
{
MeetingImportance meet = MeetingImportance.Critical;
int value = (int)MeetingImportance.Critical;
if (meet == MeetingImportance.Trivial)
{
Console.WriteLine("Trivial:{0}",value);
}
else if (meet == MeetingImportance.Regular)
{
Console.WriteLine("Regular:{0}",value);
}
else if (meet == MeetingImportance.Critical)
{
Console.WriteLine("Critical:{0}",value);
}
}
}
}
Downlaod Enum Source Code