Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
How to declare lists of list in c#: if I have two lists
C#
hol = new List<Holidays>();
List<DateTime> datelist = null;

One is of datetime type and other is of int type.
how to add one list into another if i have to make lists of list.??
Posted
Updated 1-Jul-10 9:56am
v5

1 solution

I am not sure what you are looking for, but we can define list of lists in C# as below.
C#
List<List<int>> intLists = new List<List<int>>();
 
Share this answer
 
Comments
khaula 2 1-Jul-10 7:36am    
oh yeah thanx i get it..:)
error resolved:)
Johnny J. 1-Jul-10 16:12pm    
Then why haven't you marked the question as answered? That's the correct way of letting others know it has been solved.
khaula 2 2-Jul-10 1:12am    
umm...sry i didnt kno that...but thanx 4 tellin:)
Laxman Auti 5-Jul-10 14:42pm    
Please accept the answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900