-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Text.Json: The type 'System.String&' may not be used as a type argument. #80816
Comments
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsWhy the following serialization fails when the parameter is a reference type?
|
Why do you use "in string" instead of "string"? |
Duplicate of #46088. |
@Tornhoof To prevent creating another copy of the string. GC, performance things. |
Yeah, but Strings are both reference types and immutable, so that's the default behavior. |
I benchmarked both methods in Release mode and the result are below. The difference is insignificant.
|
Why the following serialization fails when the parameter is a reference type?
The text was updated successfully, but these errors were encountered: