using System;
namespace StringApplication
{
class Program
{
static void Main(String []args)
{
string str1 = "This is text";
string str2 = "This is test";
if (String.Compare(str1, str2) == 0)
{
Console.WriteLine(str1 + "and" + str2 + "This are equal");
}
else
{
Console.WriteLine(str1 + "and" + str2 + "This are not equal");
}
Console.ReadKey();
}
}
}
output:
This is textandThis is testThis are not equal