Cannot use an array initializer expression to assign to a non-array type. Try using a new expression instead.
Syntax that is appropriate to initialize an array was used in the declaration of a non-array.
The following sample generates CS0622:
using System; public class MainClass { public static void Main () { int i = { 1 }; // CS0622 // try the following instead // int i = 1; // or // int i = new int(1); i++; } }