C#: can 'out' parameters in functions be object properties/variables?
eg:
can I call a function as follows:
someFunction(x, y, out myObject.MyProperty1)
Properties are [a pair of get and set] methods with a cute syntax for invoking them that makes them look like fields.
Out parameters can be references to fields or stack based 'fields' (i.e., locals).
The bridging of this gap is generally not addressed by languages (and definitely not directly by the CLR and IL model). (+1 on @Heinzi for the VB trickery references)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With