static void Anagrams() { var string1 = "heart"; var string2 = "earth"; Console.WriteLine($"{string1} and {string2} are anagrams: {AnagramChecker.CheckAnagramImperative(string1, string2)}"); Console.WriteLine($"{string1} and {string2} are anagrams: {AnagramChecker.CheckAnagramDeclarative(string1, string2)}"); Console.WriteLine($"{string1} and {string2} are anagrams: {string1.IsAnagramOf(string2)}"); }
static void Main(string[] args) { var string1 = "heart"; var string2 = "earth"; var repo = new CustomerRepository(); Console.WriteLine($"{string1} and {string2} are anagrams: {AnagramChecker.CheckAnagramImperative(string1, string2)}"); Console.WriteLine($"{string1} and {string2} are anagrams: {AnagramChecker.CheckAnagramDeclarative(string1, string2)}"); Console.WriteLine($"{string1} and {string2} are anagrams: {string1.IsAnagramOf(string2)}"); Console.ReadKey(); }