Answers for "c# compare two strings equal"

C#
2

compare two strings in c#

string s1 = "string";
string s2 = "string";

if (s1 == s2)
{
  doThis();
}
Posted by: Guest on December-02-2021
0

c# identical strings not equal

/*
Reflection can use characters that look like other characters, but are actually different!
 
Reflection boxes the values twice into new objects and == will compare by reference. 
Try using object.Equals(currentValue, newValue) instead or convert the objects to strings first.
*/
Posted by: Guest on December-10-2020

Code answers related to "c# compare two strings equal"

C# Answers by Framework

Browse Popular Code Answers by Language