I left a long gap from my last post and I apologize to those who were interested in reading more.

Building on the prior lesson we are going to use a switch statement to analyze input. This program will ask to enter a the user's name and if the users name matches any of the entries within the switch statement it will spit out a custom greeting. If there is no match, a default greeting will appear.

Code:
 
 
using System;
 
 
 
namespace UsingSwitch
 
{
 
 ///<summary>
 
 /// Testing out the Switch Statement
 
 ///</summary>
 
 class usingSwitch
 
	{
 
 ///<summary>
 
 /// You can enter four different names that will result
 
 /// in a custom response. All other names will get a 
 
 /// default response. Make sure to substitute your name
 
 /// in the first case statement.
 
 ///</summary>
 
		 [STAThread]
 
 static void Main(string[] args)
 
		 {
			 //Two strings used. 
 
 string fullName, greeting;
 
 
 
				Console.Write("Please enter your name: ");
 
 //Assign ‘fullName’ our Console.Readline() value
 
				fullName = Console.ReadLine();
 
 
 
 //Analyze the entered string value
 
 switch (fullName)
 
				{
 
 //replace with your name!
 
 case "YOUR NAME":
 
							greeting = "You are the best man!!";
 
 break;
 
 case "Bill Gates":
 
							greeting = "You are super wealthy.";
 
 break;
 
 case "Snoop Dogg":
 
							greeting = "You are known for rap.";
 
 break;
 
 case "M. Shadows":
 
							greeting = "Lead singer of A7X?";
 
 break;
 
 default:
 
							greeting = "I'm sorry I did not recognize you!";
 
 break;
 
				}//end switch statement
 

 
				Console.WriteLine();
 
 //Display the custom greeting based on the name entered.
 
				Console.WriteLine(greeting);
 
				Console.WriteLine();
 
 //Give user option to exit
 
				Console.WriteLine("Press [ENTER] to Exit");
 
				Console.ReadLine();
 
 
 
 
 
		 }//end Main
 
	}//end class "switchStatement
 
}//end namespace
So basically you can enter YOUR NAME, Bill Gates, M. Shadows or Snoop Dogg and get a custom greeting. If you enter any other name you will get the default greeting noted towards the end of the SWITCH statement.

Now if you enter all lower cases (i.e. snoop dogg) as opposed to Snoop Dogg, you will get the default greeting. If I am not mistaken, (anyone correct me if I am wrong) this is because lowercase letters have different values than uppercase and the conditional will not evaluate.

Well I hope this furthers your progress. The next lesson will cover mathematical operators. BTW this is still a console app.