So obviously needed to look for an alternate. Got quite a few of them but this one looked quite nifty and sleek. Take a look
private string StringReverse(string ToReverse)
{
Array arr = ToReverse.ToCharArray();
Array.Reverse( arr );// reverse the string
char[] c = (char[])arr;
byte[] b = System.Text.Encoding.Default.GetBytes(c);
return System.Text.Encoding.Default.GetString(b);
}
-- Ashutosh
No comments:
Post a Comment