using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
public enum BillType { OPD, IPD, STORE }
static void Main (string[] args)
{
generateInvloce(BillType.IPD);
}
public static bool generateInvloce(BillType billType)
{
switch (billType)
{
case BillType.IPD:
Console.WriteLine((int)BillType.IPD);
break;
case BillType.OPD:
Console.WriteLine(BillType.OPD.ToString());
break;
case BillType.STORE:
Console.WriteLine(BillType.STORE.ToString());
break;
default:
break;
}
Console.ReadKey();
return true;
}
}
}
Good post, it clears my understandings
ReplyDelete