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

增加信息时学号姓名一起,使学号不能输入
public void inputInfo()
        {
            StudentInfo st = new StudentInfo();
            Console.WriteLine("          你的学号是:");
            id = Console.ReadLine();
            Console.WriteLine("          你的姓名是:");
            name = Console.ReadLine();
            Console.WriteLine("          你的性别是:");
            sex = Console.ReadLine();
            Console.WriteLine("          你的年龄是:");
            age = Console.ReadLine();
            Console.WriteLine("          你的专业是:");
            major = Console.ReadLine();
            Console.WriteLine("          你的兴趣是:");
            interest = Console.ReadLine();
        }[code=csharp class Program
    {
        public static void Main(string[] args)
        {
            handle hand = new handle();
            menu k = new menu();
            k.showInfo();
            int m;
            m = Console.Read();
            Console.Read();
            switch (m)
            {
                case '1':                    
                    Console.WriteLine("---------------------(信息的增加1)请输入学号--------------------");
                    StudentInfo st = new StudentInfo();
                    hand.Add(st);
                    break;