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
string one = "AAAB"; string two = "AAAAC"; int found = -1; int index = 0; while (one != two && found == -1 && one.Length > index && two.Length > index) { if (one[index] != two[index]) found = index; index++; }