Mega Code Archive

 
Categories / C# / Data Types
 

Reverse a string

//The MIT License (MIT) //http://arolibraries.codeplex.com/license using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace AroLibraries.ExtensionMethods.Strings {     public static class StringExt     {         public static string Ext_Reverse(this string s)         {             if (s == null) throw new ArgumentNullException("String is NULL");             char[] charArray = s.ToCharArray();             Array.Reverse(charArray);             return new string(charArray);         }     } }