using System; namespace ConsoleApplication4 { /// <summary> /// Summary description for Class1. /// </summary> class Class1 { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] args) { string str1 = ""; string str2 = ""; string itMatches = ""; string itMatchesCase = ""; Console.Write("INPUT FIRST STRING : "); str1 = Console.ReadLine(); Console.Write("INPUT SECOND STRING : "); str2 = Console.ReadLine(); Console.WriteLine("First use String.Compare(str1,str2)"); int compcaseval= String.Compare(str1,str2); if (compcaseval==0) itMatches=str1 + " matches " + str2+" with Case Sensitivity" ; else itMatches=str1 + " does not match " + str2+" with Case Sensitivity" ; Console.WriteLine("Compare function returns {0} without 3rd param",compcaseval); Console.WriteLine(itMatches); Console.WriteLine("Use the Compare Function setting third param true"); Console.WriteLine("Expression returns : {0}",String.Compare(str1,str2,true)); int compval= String.Compare(str1,str2,true); if (compval==0) itMatches=str1 + " matches " + str2+" without Case Sensitivity" ; else itMatches=str1 + " does not match " + str2+" without Case Sensitivity" ; Console.WriteLine("Compare function returns {0} with 3rd param true ",compval); Console.WriteLine(itMatches); Console.WriteLine("Using str1.CompareTo(str2) you get case sensitivity and it returns "+str1.CompareTo(str2)); // Equals returns bool but Compare returns int Console.WriteLine("Use the Equals function"); if (str1.Equals(str2)) itMatchesCase=str1 + " matches " + str2 +" with Case Sensitivity"; else itMatchesCase=str1 + " does not match " + str2 + " with Case Sensitivity"; Console.WriteLine(itMatchesCase); Console.WriteLine("Now compare just using != "); if (str1 != str2) { Console.WriteLine("{0} does not match {1}",str1,str2); } else Console.WriteLine("{0} matches {1}",str1,str2); Console.Read(); } } }Perhaps someone who actually knows something about this will jump in and help us both < bg >