using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Arrays
{
class Program
{
static void Main(string[] args)
{
// Here we are creating an array called &quot;vowels&quot;, that can house up to 5 items.
string[] vowels = new string[5];
vowels[0] = &quot;a&quot;;
vowels[1] = &quot;e&quot;;
vowels[2] = &quot;i&quot;;
vowels[3] = &quot;o&quot;;
vowels[4] = &quot;u&quot;;
for (int i = 0; i &lt; vowels.Length; i++)
{
Console.WriteLine(vowels[i]);
}
// Here is another way to declare an array, where you set all the values in a single line:
string[] fruits = {&quot;apple&quot;,&quot;bananas&quot;,&quot;oranges&quot;,&quot;mangoes&quot;};
for (int i = 0; i &lt; fruits.Length; i++)
{
Console.WriteLine(fruits[i]);
}
// Here is an array of integers:
int[] PrimaryNumbers = {1,2,3,5,7,11,13};
for (int i = 0; i &lt; PrimaryNumbers.Length; i++)
{
Console.WriteLine(PrimaryNumbers[i]);
}
// The following only outputs &quot;System.String[]&quot; or &quot;System.Int32[]&quot;, hence not that useful.
Console.WriteLine(vowels);
Console.WriteLine(fruits);
Console.WriteLine(PrimaryNumbers);
}
}
}

Tip: In the above examples we used the for-loop to process each item in the variable. However, it is often easier to use the foreach loop instead (we will do this in our next example).