NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error CS0622

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++;
   }
}