Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class foo
- {
- public int id {get; set;}
- public string name{ get; set; }
- public ICollection<bar> bar{ get; set; }
- }
- public class bar
- {
- public int id {get; set;}
- public string name{ get; set; }
- }
- foo fooexample = new foo();
- foreach (var object in exceldata)
- {
- fooexample.id = exceldata.id;
- fooexample.bar.id = exceldata.bar.id;
- // <-- how do I do this? if I need to initialize it, how?
- }
Add Comment
Please, Sign In to add comment