ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Reverse a string
static class Helpers { public static string Reverse(this string s) { char[] c = s.ToCharArray(); Array.Reverse(c); return new string(c); } }
string s = "Test"; string r = s.Reverse(); // "tseT"
Author: unknown
Submitted on: 21 aug. 2007
Language: C#
Type: System.String
Views: 5360