Skip to content

Breaking-up interpolated strings into pieces #29440

@kuzminrobin

Description

@kuzminrobin

I failed to find on the page (and this one too) the answer to the following question.

If the interpolated string is very long and I want to break it up into multiple pieces (each having an interpolation expression), then does each part have to be prefixed with $?
Example: Original interpolated string $"{a}{b}".
Which break-up is right,
this $"{a}" + "{b}" or
this $"{a}" + $"{b}"?


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