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 CS0212

You can only take the address of unfixed expression inside of a fixed statement initializer

The following sample generates CS0212 and shows how to take the address of an unfixed expression:

public class MyClass {
   public int TestInt = 0;
}

public class MyClass2 {
   unsafe public static void Main() {
      MyClass C = new MyClass();
      int *j = &C.TestInt;
      /* instead, try the following:
      fixed (int *j = &C.TestInt;) {
      }
      */
   }
}