Nira Max

Nira Max

  • NA
  • 2
  • 2.1k

Bulk assign students from list to groups

May 19 2014 8:46 AM
hello I have a c# list<T> of students loaded by a csv file. I want to assign them in to New Groups which automatically created by the coding,according to students(Group have limit of min-2 & max-4 students) on button click. Please Help me 
 
my List
List<Students> students = new List<Students>();
 
this is my class file
class Students
{
public int ID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public string MarksWeight { get; set; }
public decimal Marks { get; set; }
public string GroupID { get; set; }
public static Students Add(string[] inputs)
{
Students student = new Students();
student.ID = Convert.ToInt32( inputs[0]);
student.FirstName = inputs[1];
student.LastName = inputs[2];
student.Email = inputs[3];
student.MarksWeight = inputs[4];
student.Marks =Convert.ToDecimal( inputs[5]);
student.GroupID = inputs[6];
return student;
}
}
 

Answers (1)