Test for equality between stings in CSharp
Description
The following code shows how to test for equality between stings.
Example
/*ww w .j a v a2 s . com*/
using System;
using System.Text;
class StringApp {
static void Main(string[] args) {
string s1 = "Hello ";
string s2 = "World!";
Console.WriteLine("s1 == s2: {0}", s1 == s2);
Console.WriteLine();
}
}
The code above generates the following result.