Simple Enum Example

Rajesh_Kumar
Posted by Rajesh_Kumar under C# category on | Points: 40 | Views : 592
public enum DB_Mode
{
New,
Edit,
Update
};

DB_Mode value = DB_Mode.New;

if (value == DB_Mode.New)
{
//write code for insert records
}
else if (value == DB_Mode.Edit)
{
//write code for editing records
}

Comments or Responses

Login to post response