Thanks, I wasn't sure about 'this' in a closure but you confirmed my assumptions.
"This" can be a pain in c#. It's a read only value you can't pass by reference. I create a Self field during construction and pass that instead but you can't do that in constructor " x() : baseX() " calls.
Using 'This' should only boil down to extra specification on which fields you are modifying. You shouldn't have to use it outside the class and its available everywhere in the class. If you need multiple instances elsewhere, it's much better to consume an array of the data and pass around a reference to that.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks, I wasn't sure about 'this' in a closure but you confirmed my assumptions.
"This" can be a pain in c#. It's a read only value you can't pass by reference. I create a Self field during construction and pass that instead but you can't do that in constructor " x() : baseX() " calls.
Try singletons instead.
SomeClass.Instance.SomeFunc()
Using 'This' should only boil down to extra specification on which fields you are modifying. You shouldn't have to use it outside the class and its available everywhere in the class. If you need multiple instances elsewhere, it's much better to consume an array of the data and pass around a reference to that.