http://blog.csdn.net/cdsgajxlp/archive/2007/09/27/1802465.aspx

解决方案 »

  1.   

    兄弟,你给我看的文章好象没有解决我的问题:
    我要的是怎样才能使空指针指向类,就如下面的代码:public Class Student
    (
        protected int ID;
        protected string Name;
    )Student stuOBJ=new Student();
    void* vP=&stuOBJ;当然这上不能通过编译的。
      

  2.   

    指针不能指向托管的类。在不安全的上下文中,类型可以是指针类型以及值类型或引用类型。指针类型声明具有下列形式之一: 
    unmanaged type* identifier;
    void* identifier;
     参数
    unmanaged type 下列软件之一: sbyte、byte、short、ushort、int、uint、long、ulong、char、float、double、decimal 或 bool。任何枚举类型。任何指针类型。仅包含非托管类型的字段的任何用户定义的结构类型。identifier 
    指针变量名称。