Quick question about structs... I have a struct, lets pretend it looks like this:
struct myStruct {
public int x, y;
}
And then I make a list filled with that struct
List<myStruct> myList = new List<myStruct>;
And then later I loop through the list and I want to change the value of x...
for(int i=0; i<myList.Count; i++) {
...//do stuff to x
myList[i].x = newX;
}
Cannot modify the return value of 'List<myform.myStruct>.this[int]' because it is not a variable
Can you please clear up any confusion I'm having as to why it's not letting me change the value of x.