📅  最后修改于: 2022-03-11 14:49:00.350000             🧑  作者: Mango
public static bool IsPalindrome(string text)
{
if (text.Length <= 1)
return true;
else
{
if ( text[0] != text[ text.Length - 1 ] )
return false;
else
return IsPalindrome( text.Substring( 1, text.Length-2 ) );
}
}