❔ Changing object property not limited to scope?
So here in UserManager there is a method:
And then in the Store.SetNormalizedUserNamyAsync method:
There is no ref keyword before TUser. So doesn't that mean setting the user.NormalizedUserName is useless since the change will not be affected by whatever calls it?
5 Replies
Is
TUser
a reference type?Wouldn't you have to use the ref keyword for it to be a reference type?
No
Classes and records are reference types
Structs are value types
Huh. I always thought passing an object into aa method creates a copy of the obj. TIL. Thanks.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.