I have declared a string array and I want to compare with name given by user,
string[] MasterList = new string[] {
"Askay", "Puram", "Raman", "Srinivasa",
"Gopal", "Rajesh", "Anju", "Nagara",
};
string YourName;
Console.WriteLine("Enter your name: ");
YourName = Console.ReadLine();
for(i=0; i<5; i++)
{
a = String.Compare(MasterList[i], YourName);
Console.WriteLine("Your name is not among the list")
}
The resulting output is not what I am expecting, any ideas how I can go about it?