Hello I'm having trouble figuring this out. I have these structs and classes.
struct Circle
{ ... }
class Painting
{
List<Circle> circles;
public List<Circle> circles
{
get { return circles; }
}
}
I am trying to modify one of the circles inside the painting class from outside it, using this code:
MutatePosition(ref painting.Circles[mutationIndex], painting.Width, painting.Height);
This line is giving me a compiler error:
A property, indexer or dynamic member access may not be passed as an out or ref parameter
Why is this, and what can I do to solve it without changing my code too much?