Advertisement
Assi

13. Strings and Text Processing 2. StringInReverse

Jan 24th, 2013
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using System;
  2.  
  3. class StringInReverse
  4. {
  5.     static void Main()
  6.     {
  7.         string str = "abcd";
  8.         char[] strArr = str.ToCharArray();
  9.         Array.Reverse(strArr);
  10.        
  11.         Console.WriteLine(strArr);
  12.         //Here I will printed from index[1] with length 2
  13.         Console.WriteLine(strArr, 1, 2);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement