compare text c#
string str1 = "London";
string str2 = "London";
str1 == str2; // true
str1.Equals(str2); // true
compare text c#
string str1 = "London";
string str2 = "London";
str1 == str2; // true
str1.Equals(str2); // true
c# compare type
using System;
using System.Reflection;
class Example
{
public static void Main()
{
Type a = typeof(System.String);
Type b = typeof(System.Int32);
Console.WriteLine("{0} == {1}: {2}", a, b, a.Equals(b));
// The Type objects in a and b are not equal,
// because they represent different types.
a = typeof(Example);
b = new Example().GetType();
Console.WriteLine("{0} is equal to {1}: {2}", a, b, a.Equals(b));
// The Type objects in a and b are equal,
// because they both represent type Example.
b = typeof(Type);
Console.WriteLine("typeof({0}).Equals(typeof({1})): {2}", a, b, a.Equals(b));
// The Type objects in a and b are not equal,
// because variable a represents type Example
// and variable b represents type Type.
//Console.ReadLine();
}
}
c# comparer
public abstract class Comparer<T> : System.Collections.Generic.IComparer<T>, System.Collections.IComparer
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us