Advertisement
touhid_xml

Switch Statement C#

Apr 4th, 2013
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. <%@Page Language="C#" %>
  2.  
  3. <script runat="server">
  4.    
  5.     void Page_Load(Object Sender, EventArgs e)
  6.     {
  7.         int x = 5;
  8.  
  9.         switch (x)
  10.         {
  11.             case 0:
  12.                 Response.Write("The number is Zero");
  13.                 break;
  14.  
  15.             case 1:
  16.                 Response.Write("The number is one");
  17.                 break;
  18.             case 2:
  19.                 Response.Write("The number is two");
  20.                 break;
  21.             case 3:
  22.                 Response.Write("The number is three");
  23.                 break;
  24.             case 4:
  25.                 Response.Write("The number is four");
  26.                 break;
  27.             case 5:
  28.                 Response.Write("The number is five");
  29.                 break;
  30.             case 6:
  31.                 Response.Write("The number is six");
  32.                 break;
  33.            
  34.  
  35.         }
  36.     }
  37.  
  38. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement