Skip to content

String constructor doesn't actually always return a new string #10691

Open
@mjwills-k

Description

@mjwills-k

Type of issue

Missing information

Description

https://dotnetfiddle.net/rATujf

https://learn.microsoft.com/en-us/dotnet/api/system.string.-ctor?view=net-8.0#system-string-ctor(system-char()) says "Initializes a new instance". But the above sample shows that isn't always true.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.string.-ctor?view=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/String.xml

Document Version Independent Id

90baab9e-9ef3-9bb5-d433-8d861d7fa876

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.RuntimeuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions