using System; namespace Example47 { /// /// Summary description for Class1. /// class Class1 { /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { String s = "a houseboat"; String s1 = "house"; String s2 = s.Substring(2,5); String s3 = "horse"; String s4 = s1; Console.WriteLine("s1 == s2 is {0}", s1 == s2); Console.WriteLine("s1.Equals(s2) is {0}", s1.Equals(s2)); s3 = s3.Replace('r','u'); Console.WriteLine("s2 == s3 is {0}", s2 == s3); String w1 = "Apple"; String w2 = "apple"; String w3 = "butter"; Console.WriteLine("{0} compared to {1} is {2}", w1, w2, w1.CompareTo(w2)); Console.WriteLine("{0} compared to {1} is {2}", w1, w3, w1.CompareTo(w3)); } } }