Answers for "can i compare strings in c#"

C#
0

c# string.compare

public static int Compare (string? strA, string? strB);
                                                                                 
//Less than zero strA precedes strB in the sort order
//zero strA occurs in the same position as strB in the sort order
//Greater than zero strA follows strB in the sort order
Posted by: Guest on June-02-2021
-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