Skip to content

Champion: verbatim interpolated string (order of $@ vs. @$) (16.3, Core 3) #1630

@stuartstein777

Description

@stuartstein777

This proposal will extend object initializers to allow @$"hello" as a verbatim interpolated string, compared to $@"hello" (current interpolated verbatim string).

  • Proposal added
  • Discussed in LDM (2018-7-9)
  • Decision in LDM (let's do it, 2018-7-9)
  • Finalized (done, rejected, inactive)
  • Spec'ed

LDM history:


Would it be possible for the order of the string interpolation and string literal identifiers to not matter?

e.g.

var foo = $@"c:\foo\{someFile}";

Is fine, but

var foo = @$"c:\foo\{someFile}";

isn't...

There's probably a good reason for it that I'm missing, but would it be possible to make the order not matter?

O/T And looking at the title, I now realise $@ v @$ looks a bit like some funky owl, which I'm pleased with.

Metadata

Metadata

Assignees

Labels

Implemented Needs ECMA SpecThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationProposal champion

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions