Out parameters and exceptions

Pretty much, that is an aspect of what out means; firstly, note that out doesn’t really exist – we only really need to consider ref (out is just ref with some “definite assignment” tweaks at the compiler). ref means “pass the address of this” – if we change the value via the address, then that shows immediately – it is, after all, updating the memory on the stack of Main. It can’t abstract this (to delay the write) because the value could be, for example, some oversized struct that is using ref specifically for the purpose of avoiding copying it on the stack (an approach used extensively in XNA etc).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)