public Collection<Student> students = Program.Students;public class Program
    {
        private static string userName;        public static Collection<Student> Students
        {
            get
            {
                return new Collection<Student>("students.txt");
            }
        }怎么会出错呢?????

解决方案 »

  1.   

    new Collection<Student>("students.txt");//你见过谁家的Collection<T>有这种构造函数?
    ------------
    new Collection<Student>();orIList<Student> list=......;
    new Collection<Student>(list);
    乱弹琴...
      

  2.   

    报的错是
    类型"studentsystemdemo.student"必须可转换为"system.collection.generic.icomparer<studentsystemdemo.student>"才能用作范性类型或方法"studentsystemdemo.collection<T>"中的参数"T"