Hello friends!
I'm newbie in c# and I have in my project two classes: User and Entity. I want to create a List of List of these classes. Bellow what i tried.
- List
lu =newList ();List le =newList (); - User a =newUser();
- User b =newUser();
- User c =newUser();
- User d =newUser();
- Entity w =newEntity();
- Entity x =newEntity();
- Entity y =newEntity();
- Entity z =newEntity();
- lu.Add(a);
- lu.Add(b);
- lu.Add(c);
- lu.Add(d);
- le.Add(w);
- le.Add(x);
- le.Add(y);
- le.Add(z);
- //This part dont work!
- List
- > l =newList
- >();
- l.Add(lu);l.Add(le);
- foreach(var p inViewBag.usrs)
- {
-
@p.Name @p.LasName - }
Tapan PatelPosted Oct 15, 2017, 10:00 PM