Reverse a string with out using string.reverse function in c#

string txt="Data sample";        
   string strsr = null;
            for (int i = txt.Length - 1; i > 0; i--)
            {
                strsr = strsr + txt[i].ToString(); ;
            }

Comments

Popular posts from this blog

How to write Pure java script Program?