Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

C# Check if variables are equal

string str1 = "1";
string str2 = "1";

if(String.Compare(str1, str2) == 0)
{
    Console.WriteLine(str1 + " and " + str2 + " are equal");
}
else
{
    Console.WriteLine(str1 + " and " + str2 + " are not equal");
}
Console.ReadKey();
 
PREVIOUS NEXT
Tagged: #Check #variables #equal
ADD COMMENT
Topic
Name
9+3 =