Veverke
Veverke

Reputation: 11358

Is there a way to use C# 6's String Interpolation with multi-line string?

Is there a way to use C# 6's String interpolation with multi-line strings ?

Something like

   string a = "1111";
   string s = @$"
         {a}    
    ";

The above does not work.

Upvotes: 2

Views: 1068

Answers (1)

Doruk
Doruk

Reputation: 914

Try swapping the places of $ and @.

Upvotes: 8

Related Questions