Monday, January 14, 2008

Function to Reverse a String in C#

 public static String Reverse(String strParam)
{
if(strParam.Length==1)
{
return strParam;
}
else
{
return Reverse(strParam.Substring(1)) + strParam.Substring(0,1);
}
}

No comments: