In C#, I know that by default, any parameters passed into a function would be by copy, that\'s, within the function, there is a local copy of the parameter. But, what about when
Assuming someTestObj
is a class
and not a struct
, the object is passed by reference, which means that both obj
and someTestObj
refer to the same object. E.g. changing name
in one will change it in the other. However, unlike if you passed it using the ref keyword, setting obj = somethingElse
will not change someTestObj
.