"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Friday, January 7, 2011

Reverse Of a string In c#

Hi, 
2day I'm showing a string in reverse
Code

                string _reverse = "Simplyasp.blogspot.com";
                char[] _printArray = _reverse.ToCharArray();
                Array.Reverse(_printArray);
                lbl_Message.ForeColor = System.Drawing.Color.Red;
                lbl_Message.Text = _reverse.ToString() + " Reverse : " +(new       string(_printArray))+"";

Result

          Simplyasp.blogspot.com 

Reverse : moc.topsgolb.psaylpmiS




Have a nice day... 'N happy Coding :)

No comments: