بررسی دستور switch
همانند دستور if ، دستور switch نیز امکان تصمیم گیری را در یک برنامه فراهم مینماید . مثال 3-2 - دستورالعمل switch
using System;
class SwitchSelect
{
public static void Main()
{
string myInput; int myInt; begin:
Console.Write("Please enter a number between 1 and 3: "); myInput = Console.ReadLine(); myInt = Int32.Parse(myInput);