
This is a snippet for reversing a string
public string ReverseString(string str)
{
char[] array = new char[str.Length];
int len = str.Length - 1;
for (int i = 0; i <= len; i++)
{
array[i] = str[len - i];
}
return new string(array);
}-Offline- |