using System;
//csc string_compareto.cs
namespace ex_compareto
{
public class MyClass
{
public void process(string s1, string s2)
{
Console.WriteLine("You entered : {0},{1},{2}" , s1 , ":" , s2 );
int n = s1.CompareTo(s2);
Console.WriteLine("--Compare frist with second---");
if (n==0){ Console.WriteLine("Matched ");}
else if(n>0){Console.WriteLine("Did not Match: Value is more ");}
else if(n<0){Console.WriteLine("Did not Match: Value is less ");}
Console.WriteLine("--Compare second with first---");
int n2 = s2.CompareTo(s1);
if (n==0){ Console.WriteLine("Matched ");}
else if(n2>0){Console.WriteLine("Did not Match: Value is more ");}
else if(n2<0){Console.WriteLine("Did not Match: Value is less ");}
}
}
public class test
{
public static void Main()
{
Console.Write("Enter a your password : ");
string str1 = Console.ReadLine();
Console.Write("Repeat your password : ");
string str2 = Console.ReadLine();
MyClass my = new MyClass();
my.process(str1, str2);
Console.ReadLine();
}
}

}