Reverse of a string without using the Reverse function in C# and VB
I wouldn't create a class for this. I'd make it an extension method, and then do this:public static class String Extensions{ public static string Reverse(this string value) { value = // do your reverse code here; return value; }}// Usage:string x...
I wouldn't create a class for this. I'd make it an extension method, and then do this:
public static class String Extensions
{
public static string Reverse(this string value)
{
value = // do your reverse code here;
return value;
}
}
// Usage:
string x = "reverse";
x = x.Reverse();