Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Change values of list in list<list>
ngon nguyen van
Aug 22 2016 2:44 PM
202
Reply
Hello all. I have the code in c#
List<int> lst = new List<int>() { 1, 2, 3, 4, 5, 6 };
List<List<int>> l1 = new List<List<int>>();
l1.Add(lst);
result in l1: 1 2 3 4 5 6
lst[1] = 10;
result in l1: 1 10 3 4 5 6
i want when change value of lst example. lst[1] = 10, elements of l1 do not change.
example when change value lst[1] = 10, result in l1: 1 2 3 4 5 6
How do it??? Thanks all!
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
how to get the exact next date from a given date in c#
deleting selected button that are in gray color