Answers for "string compare c#"

C#
3

compare text c#

string str1 = "London";
string str2 = "London";
 
str1 == str2; // true
str1.Equals(str2); // true
Posted by: Guest on December-14-2020
14

string format c#

using System;

namespace FormatingTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = "Name:{0} {1}, Location:{2}, Age:{3}";
            string msg = string.Format(s, "Ram", "Singh", "Mumbai", 32);
            Console.WriteLine("Format Result: {0}", msg);
            Console.WriteLine("nPress Enter Key to Exit..");
            Console.ReadLine();
        }
    }
}
Posted by: Guest on April-02-2020
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
0

c# comparer

public abstract class Comparer<T> : System.Collections.Generic.IComparer<T>, System.Collections.IComparer
Posted by: Guest on March-19-2021

C# Answers by Framework

Browse Popular Code Answers by Language