public static void Main()
bool result = salidzinaStr(str1, str2, 0);
Console.WriteLine("The strings are identical.");
Console.WriteLine("The strings are not identical.");
static bool salidzinaStr(string str1, string str2, int position)
if (str1.Length != str2.Length)
if (position == str1.Length)
if (str1[position] != str2[position])
return salidzinaStr(str1, str2, position + 1);