Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1.         static void Main()
  2.         {
  3.             byte[] mb = { 1, 2, 3, 4, 5 };
  4.             for (int i = 0; i < mb.Length; i++)
  5.             {
  6.                 Console.WriteLine("element {0} - {1}", i, mb [i]);
  7.             }
  8.  
  9.             string ch = "ABCDEFG";
  10.             char[] chars = ch.ToCharArray();
  11.             for (int i = 0; i < chars.Length; i++)
  12.             {
  13.                 Console.WriteLine("element {0} - {1}", i, chars [i]);
  14.             }
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement