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 CS0230

Type and identifier are both required in a foreach statement

A foreach statement was poorly formed.

The following sample generates CS0230:

using System;
class MyClass {
   public static void Main() {
      int[] myarray = new int[3] {1,2,3};
      foreach (int in myarray) {   // CS0230
      // try the following line instead
      // foreach (int x in myarray) {
         Console.WriteLine(x);
      }
   }
}