using System.Collections.Generic;
public static void Main()
Console.WriteLine("Enter First string: ");
First = Console.ReadLine();
Console.WriteLine("Enter Second string: ");
Second = Console.ReadLine();
var result = IsAnagram(First,Second);
Console.WriteLine((result == true) ? "It is Anagram" : "It is not Anagram");
public static bool IsAnagram(string first, string second)
char[] ch1 = str1.ToLower().ToCharArray();
char[] ch2 = str2.ToLower().ToCharArray();
string val1 = new String(ch1);
string val2 = new String(ch2);
public string First {get;set;}
public string Second {get;set;}
public bool Expected {get;set;}