[C#][Tips] 配列 宣言・インスタンス・初期値

//**********************************************
/// [Array] 宣言・インスタンス・初期値
//**********************************************
public static void mArray_Init()
{

    //==========================
    /* 宣言 */
    //==========================
    int[] iaList;

    //==========================
    /* インスタンス */
    //==========================
    //iaList = new int[];  // err! 
    iaList = new int[5];

    //==========================
    /* 初期値 */
    //==========================
    iaList = new int[3] { 1, 2, 3 };
    iaList = new int[] { 1, 2, 3 };

    iaList.ToList().ForEach(c => Console.Write(c + " : "));
    Console.WriteLine();

    iaList = Enumerable.Repeat(9, 15).ToArray();
    iaList.ToList().ForEach(c => Console.Write(c + " : "));
    Console.WriteLine();

    string saList = new string('*',9);
    saList.ToList().ForEach(c => Console.Write(c + " : "));
    Console.WriteLine();
}