Hi guys,
I have a class which contains similar property names like:
public class numbers()
{
public int Number1
Public int Number2
}
I then have a method where I iterate through a collection and want to assign a particular property with a value based on the interation count. So if is the first interation Number1 should get the value.
What im trying to do is something like the following
for(var i = 1; i < collection.count; i++)
{
Number[i] = colllection[i].Number[i];
` }
This is obviously given me an error on the property. Does anyone know how can i add the interation number on the property name which would make it look like what my property is actually called?
Thank you