Venciity

[ Telerik C#] Primitives And Variables - EX 6

Feb 13th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. //Declare a boolean variable called isFemale and assign an appropriate value corresponding to your gender.
  2.  
  3. using System;
  4.  
  5. namespace _06_MyGender
  6. {
  7.     class MyGender
  8.     {
  9.         static void Main()
  10.         {
  11.             bool isFemale = false;
  12.  
  13.             switch (isFemale)
  14.             {
  15.                 case true:
  16.                     Console.WriteLine("Nice to meet you milady !");
  17.                     break;
  18.                 case false:
  19.                     Console.WriteLine("Good evening milord !");
  20.                     break;
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment