Check out example codes for "c sharp if string equals". It will help you in understanding the concepts better.
Code Example 1
// There are two ways to check if 2 strings are the same:
string str1 = "Hello";
string str2 = "Hello";
// The first is using double equals sign ==
str1 == str2; // Output: true
// The second is using the 'Equals()' function
str1.Equals(str2); // Output: true
Learn ReactJs, React Native from akashmittal.com