I want to get the first place where 2 string vary from each other. example: for these two strings: \"AAAB\" \"AAAAC\"
I want to get the result 4.
How do i d
static void Main(string[] args)
{
Console.WriteLine("enter s1 :");
string s1 = Console.ReadLine();
Console.WriteLine("enter s2 :");
string s2 = Console.ReadLine();
Console.WriteLine("note: zero means there is *no* first dif index starting from s1 ");
Console.WriteLine("first dif index of s1 :{0}", findFirstDifIndex(s1, s2)+1);
}
private static int findFirstDifIndex(string s1, string s2)
{
for (int i = 0; i