public static void Main(string[] args)
string text1 = "software";
string text2 = "waretfos";
Console.WriteLine("Original strings: " + text1 + " " + text2);
Console.WriteLine("Check if two strings are anagrams or not: " + test(text1, text2));
Console.WriteLine("\nOriginal strings: " + text1 + " " + text2);
Console.WriteLine("Check if two strings are anagrams or not: " + test(text1, text2));
Console.WriteLine("\nOriginal strings: " + text1 + " " + text2);
Console.WriteLine("Check if two strings are anagrams or not: " + test(text1, text2));
Console.WriteLine("\nOriginal strings: " + text1 + " " + text2);
Console.WriteLine("Check if two strings are anagrams or not: " + test(text1, text2));
public static bool test(string text1, string text2)
string stext1 = String.Concat(text1.ToUpper().OrderBy(c => c));
string stext2 = String.Concat(text2.ToUpper().OrderBy(c => c));