There is a code

var s1 = @"qwe asd zxc"; var s2 = $@"123 {s1} 456"; Console.WriteLine(s2); 

He will bring

 123 qwe asd zxc 456 

This is generally logical, but I want the tabulation to work not only for the first line, but for the entire block to be inserted.

Expected output

 123 qwe asd zxc 456 
  • Are you sure that you have a tab there? - Grundy
  • yes no. And what is the expected conclusion? - Grundy
  • Specify tabs in string constants explicitly through \t and do not suffer. In the source text, making a replacement for real tabs with a service pair of characters is also not a problem. - rdorn
  • @Grundy, but at least tabulation, even spaces. I insert a block and I want it to be formatted as a block. - iRumba
  • @rdorn, you offer a ready-made example, I do not understand you. And do not forget that you need a universal solution, indents can be different (spaces, tabs and their different numbers). - iRumba

0