Export (0) Print
Expand All
Expand Minimize

Compiler Error CS1005

Visual Studio .NET 2003

Indirection to managed type is not valid

It is not possible to use unsafe references (pointer syntax) on an object or string.

The following sample generates CS1005:

// CS1005.cs
namespace x
{
   public class C
   {
      public object* po;   // CS1005
      // try the following line instead
      // public object po;
   }

   public class a
   {
      public static int Main()
      {
         return 1;
      }
   }
}
Show:
© 2014 Microsoft