If you look more carefully at lines 3 and 15 you will see that in fact the parameters are being passed by reference with the use of the "ref" keyword. Which leads to different results. I invite you to try it on your machine or using dotnetfiddle.net/ to check this.
Best regards.
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.
Hi.
Thanks for sharing your knowledge.
Let me suggest an improvement.
Sample code provided for "Passing Value Types by Reference" is the same you wrote for "Passing Value Types by Value".
Best regards.
Hi Ivan,
Thanks for the response!
If you look more carefully at lines 3 and 15 you will see that in fact the parameters are being passed by reference with the use of the "ref" keyword. Which leads to different results. I invite you to try it on your machine or using dotnetfiddle.net/ to check this.
Best regards.