-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
I was browsing this page which strongly recommends to NOT use StringBuilder
. Then few words later it says:
For more information on string marshaling, see
Default Marshaling for Strings
This is where I went because I wanted to see how I can change my code to NOT using StringBuilder
. However it doesn't show alternatives to StringBuilder
instead it also recommends using StringBuilder
while the best practices recommends NOT using StringBuilder
. This is totally confusing.
I don't know 100% which one is correct but I assume that the best practices
is. Because this is where the .NET runtime repo team always redirect people to. If that's true then this example here needs to get updated by following this best practices and showing an example which not uses StringBuilder
. Especially because there is a link set on best practices
to this page.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 25d350b8-a514-6c13-a091-0952a8fc0610
- Version Independent ID: 3ee9bbfd-2060-d97f-c2f1-12867899034a
- Content: Default Marshaling for Strings - .NET Framework
- Content Source: docs/framework/interop/default-marshaling-for-strings.md
- Product: dotnet-framework
- GitHub Login: @gewarren
- Microsoft Alias: dotnetcontent