string arrays : Array object « Data Structure « C# / CSharp Tutorial






using System;

class MainClass
{

  public static void Main()
  {
   
    string[] stringArray = new string[2];
    Console.WriteLine("stringArray[0] = " + stringArray[0]);
    stringArray[0] = "Hello";
    stringArray[1] = "World";
    foreach (string myString in stringArray)
    {
      Console.WriteLine("myString = " + myString);
    }

  }

}
stringArray[0] =
myString = Hello
myString = World








11.3.Array object
11.3.1.string arrays
11.3.2.Use object to create a generic array.
11.3.3.Use the Sort() method to sort the elements in a char array
11.3.4.A two dimensional array of objects
11.3.5.Arrays of Objects