dotnet / dotnet/dotnet-api-docs
String constructor doesn't actually always return a new string
Open
area-System.Runtime
Pri3
untriaged
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
### 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
Contributor guide
Assessment
This issue has not been assessed yet.