thattathin marayathu full movie download 720p 1080p
thattathin marayathu full movie download 720p 1080p
thattathin marayathu full movie download 720p 1080p
Category:Indian films
Category:Malayalam-language films
Category:Directorial debut films
Category:Films set in Kerala
Category:2012 films
Category:Indian romance films
Category:Indian romance films
Category:2010s Malayalam-language filmsQ:
How to change a value of an element in a collection
Say I have this nested list, and I have an element in it, and I want to change the index number of the element in the collection.
Here is my list and what I tried to do:
var MyList = new List> { new List {1,2,3}, new List {1,2,3}, new List {1,2,3} };
var Something = MyList.Single(x => x[0] == 3);
Something[0] = 100;
I thought I would need to loop through each index, but when I do this:
foreach(int i in Something)
{
int j = i + 1;
}
i is always 100. What am I doing wrong?
A:
The iterator is invalidated after the change to the element:
You need to copy the element first to a new instance of the List (with new item of type IList) and change the collection after that:
var MyList = new List> { new List {1,2,3}, new List {1,2,3}, new List {1,2,3} };
var something = MyList.Single(x => x[0] == 3);
var somethingNew = new List>(something);
somethingNew[0][0] = 100;
You can also use a variable number of elements to assign a list to a new collection:
var list = new List> { new List {1,2,3}, new List {1,2,3}, new List {1,2, ac619d1d87
Related links:
Comments