What is the difference between pass-by-value and pass-by-reference?

Senior C#

Answer

Pass-by-value: Copies the value; modifications do not affect the original.

Pass-by-reference: Passes the memory reference; modifications affect the original variable.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice