I created the following class:
namespace Prototype.ViewModel.MyVM
{
public clas TheVm
{
List<Tuple<string, bool>> list = new List<Tuple<string, bool>>();
public List<Tuple<string, bool>> List
{
get { return this.list; }
set { this.list = value; }
}
}
}
In another code file, I'm trying modify one of the values of the encapsulated List> object:
for (int i = 0; i < anotherList.Count; i++)
{
TheVM.List[i].Item2 = (anotherList[i].Item2 == 1);
}
But I get the following error message:
Property or indexer 'Tuple.Item2' cannot be assigned to “--” it is read only.
How can I solve that?