TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
diamond diamond
NA
133
55.4k
how to add a null list to list of list
?
Aug 25 2013 8:58 AM
Hi all,
I have a list its name is TP that may be a null or has data, and have a list of list vairable its name is history.
I want to add the TP list to history with help of a counter "winc".
int winc = 1;
List<string > TP ;
List <List<string> > history = new List <List<string>>() ;
When I run the code below gives exception invalid index or arument "An
ArgumentOutOfRangeException
"
history[winc-1].AddRange (TP.ToList ());
winc++;
I slould say in first time my TP list is null and TP.count() is 0.
Please help
Thanks
Reply
Answers (
4
)
datagridview
Create database using a script file