/*
Learning C#
by Jesse Liberty
Publisher: O'Reilly
ISBN: 0596003765
*/
using System;
publicclass SwitchValues
{
staticvoid Main()
{
constint Democrat = 0;
constint Republican = 1;
constint Progressive = 2;
// hard wire to Republican
int myChoice = Republican;
// switch on the value of myChoice
switch (myChoice)
{
case Democrat:
Console.WriteLine("You voted Democratic.");
break;
case Republican:
Console.WriteLine("You voted Republican.");
break;
case Progressive:
Console.WriteLine("You voted Progressive.");
break;
}
Console.WriteLine("Thank you for voting.");
}
}