0
If the parameter value is destroyed upon exit, then if we pass an local argument as parameter and whatever changes we to it inside the maethod would not be saved ?
2 Respostas
+ 2
Nope.
Everything will be destroyed upon exit. No matter what.
There are other ways to store data which I can't explain here but you can google them.
like writing app.config or external files or using data bases and so on.
0
Yes and no. Upon exit of a function all parameters are destroyed and all changes are lost if they are not declared as ref parameters. Changes for ref parameters propagate outside.
Moreover, note that for reference types only changes to the reference are lost. All changes to the referenced object persist. (Basically, the reference is the argument.)