Forum Discussion
RichardB1640
Feb 26, 2026Copper Contributor
Blazor parameter passed by reference
I got the impression that in Blazor parameters are always effectively passed by value which is why you need to use EventCallback for two-way binding to send a change in the parameter value back up to...
RichardB1640
Mar 04, 2026Copper Contributor
I don't use AI.
So you're claiming that reference values are indeed passed by reference, but you must not use this.
Does it follow that:
(1) when receiving a parameter of reference type you must take a deep copy of it upon which to make your changes,
(2) that this copy must be passed up via the event, and
(3) that the caller must deep copy the value received in the event back to the value that it passed?