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 CS0214

Pointers may only be used in an unsafe context

Pointers can only be used with the unsafe keyword.

The following sample generates CS0214:

public struct S {
   public int a;
}

public class a {
   public static int Main() {  
// try the following line instead
   // unsafe public static int Main() {
      S s = new S();
      S * s2 = &s;    // CS0214
      s2->a = 3;      // CS0214
      return 1;
   }
}