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 CS0208

Cannot take the address or size of a variable of a managed type ('S')

Even when used with the unsafe keyword, taking the address of a managed object is not allowed.

The following sample generates CS0208:

class S {
      public int a = 98;
}

public class a {
   unsafe public static int Main() {
      S s = new S();  // S is managed
      S * s2 = &s;    // CS0208
      return 1;
   }
}