日期:2014-05-17  浏览次数:20974 次

error CS0246: 未能找到类型或命名空间名称“pInt”(是否缺少 using 指令或程序集引用?)
    本人菜鸟,这两天在学习C#,遇到这个问题不知道怎么解决,

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;




namespace CS_test2
{
    class Program
    {


        static void Main(string[] args)
        {



            unsafe
            {
                int* pInt, pInt2;
                char* pChar;
                Console.WriteLine(sizeof(pInt));
                Console.WriteLine(sizeof(pInt2));

            }



        }
    }
}

------解决方案--------------------
这是 c# 大哥,肯定语法不太一致,sizeof() 参数为一个类型 而不是变量