using System.Collections.Generic;
public static void Main(){
Boolean res = IsAnagram("Hello", "hello");
public static bool IsAnagram(string a1, string a2)
string s1 = a1.ToUpper();
string s2 = a2.ToUpper();
if (string.IsNullOrEmpty(s1) || string.IsNullOrEmpty(s2))
if (s1.Length != s2.Length)
return string.IsNullOrEmpty(s1);
public static bool IsAnagram1(string s1, string s2){
string a1 = s1.ToUpper();
string a2 = s2.ToUpper();
char[] c1 = a1.ToCharArray();
List<char> data =new List<char>(c1);
if(data.Count <= 0){ return true;}