/ Published in: C#
Simple example of looping over a string array.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
using System; class Program { static void Main() { arr[0] = "one"; // Element 1 arr[1] = "two"; // Element 2 arr[2] = "three"; // Element 3 arr[3] = "four"; // Element 4 // Loop over strings foreach (string s in arr) { Console.WriteLine(s); } } }
URL: http://www.dotnetperls.com/loop-string-array