日期:2014-05-16  浏览次数:20969 次

是程序中的add缺少using指令或程序集
[code=csharp class handle
    {
        private Dictionary<string, StudentInfo> _stDict = new Dictionary<string, StudentInfo>();
        private bool Check(string id)
        {
            if (_stDict.ContainsKey(id))
            {
                return true;
            }
            else
            {
                Console.Read();
                Console.WriteLine("不存在此人!");
                return false;
            }
        }
        public void add(StudentInfo st)
        {
            st.inputInfo();
            _stDict.add(st.id, st);
            while (true)
            {
                st.showInfo();
                Console.WriteLine("请检查个人信息是否完整,如果个人信息不完整,是否要修改(y/n)");
                int q = Console.Read();
                Console.ReadLine();
                if (q == 'y')
                {
                    st.inputInfo();
                    _stDict.add(st.id, st);
                }
                break;
            }
        }
        public void modify(string id)
        {
            qur(id);
            del(id);
            StudentInfo st = new StudentInfo();
            add(st)