Export (0) Print
Expand All
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

Compiler Error CS0178

Incorrectly structured array initializer

An array initialization was ill-formed. When specifying the array dimensions, you can specify the following:

  • A number in brackets
  • Empty brackets
  • A comma enclosed in brackets

The following sample generates CS0178:

// CS0178.cs
class x
   public static void Main()
      a = new int[5][,][][5;   // CS0178, no comma or right bracket
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.