Exercise · Strings · lesson 10 of 10
Exercise: a palindrome
Write a method public static bool IsPalindrome(string s) that returns true if the string reads the same from left to right and from right to left, and false otherwise. Letter case and spaces do not count. Keep the method header as it is in the stub.
IsPalindrome("Abba")→trueIsPalindrome("Never odd or even")→trueIsPalindrome("abc")→false
Constraints: the string holds Latin letters and spaces and may be empty; an empty string and a one-letter string are palindromes.
Do not add extra using directives unless the task says so explicitly.