public static void Main()
TestPalindrome("Dad", true);
TestPalindrome("Hello World", false);
private static void TestPalindrome(string strToTest, bool expectedAnswer)
bool result = IsPalindrome(strToTest);
Console.WriteLine(strToTest + " is a palindrome? Expected Answer = " + expectedAnswer.ToString() + " Actual answer = " + result.ToString());
Console.WriteLine(result == expectedAnswer ? "TEST PASSED" : "TEST FAILED");
private static bool IsPalindrome(string strToTest)