Skip to content

Improve string concatenation example #29822

@SeanKilleen

Description

@SeanKilleen

Per comments in the PR, adding this as a follow-up to #29785, which was merged to fix #29440.

While we've improved the string interpolation example, there were follow-up suggestions from @gewarren and @BillWagner which I'm capturing here.

On https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/tokens/interpolated.md:

  • Utilize something more complex than Hello World to have a reason for there not to be one interpolated string.
  • Perhaps include the preferred choice of single string interpolation to show an alternative
  • Language update to:

To combine multiple interpolated strings, add the $ special character to each string literal.

[Edited to add doc details]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions