Answers for "c# compare strings not equal"

C#
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
-1

how to compare two strings in c# using if condition

string name1 = "content";
string name2 = "content";

if (string.compare(name1,name2) == 0)
{
	"ACTION"
}
Posted by: Guest on August-09-2021

C# Answers by Framework

Browse Popular Code Answers by Language