lundi 26 janvier 2015

Set Values for Nested Class

I have two classes:



public class Task {
public int TaskId {get;set;}
public string Desc {get;set;}
public Client taskClient {get;set;}
}

public class Client {
public string Firstname {get;set;}
public string Lastname {get;set;}
}


I have lists of values (about 100) with the following structure: TaskId = 1, Desc = "Task 1", Firstname = "Mark", Lastname ="Smith".


How can I create new tasks using reflection in this case?






Aucun commentaire:

Enregistrer un commentaire