I’m very frequently modifying an image within the picturebox so I though I would do something like this:
modify(ref pictureBox1.Image);
unfortunately it doesn’t work, it throws a following error “A property, indexer or dynamic member access may not be passed as an out or ref parameter”. Ok, I get the error – but still is there any work around or something to speed up my program?
All objects (reference types) in .NET are passed by reference, there is no benefit in adding ref keyword. Try this: