Skip to main content
added 173 characters in body
Source Link
miroxlav
  • 12.4k
  • 6
  • 66
  • 109

#Interpolated strings#Interpolated strings were added into C# 6.0 and Visual Basic 14 (bothBoth were introduced through new Roslyn compiler in Visual Studio 2015).

  • C# 6.0:

    return "\{someVariable} and also \{someOtherVariable}" OR
    return $"{someVariable} and also {someOtherVariable}"

  • source: what's new in C#6.0

Noteworthy features (in Visual Studio 2015 IDE):

  • syntax coloring is supported - variables contained in strings are highlighted
  • refactoring is supported - when renaming, variables contained in strings get renamed, too
  • actually not only variable names, but expressions are supported - e.g. not only {index} works, but also {(index + 1).ToString().Trim()}

Enjoy! (& click "Send a Smile" in the VS)

#Interpolated strings were added into C# 6.0 and Visual Basic 14 (both were introduced in Visual Studio 2015)

Noteworthy features (in Visual Studio 2015):

  • syntax coloring is supported - variables contained in strings are highlighted
  • refactoring is supported - when renaming, variables contained in strings get renamed, too
  • actually not only variable names, but expressions are supported - e.g. not only {index} works, but also {(index + 1).ToString().Trim()}

Enjoy! (& click "Send a Smile" in the VS)

#Interpolated strings were added into C# 6.0 and Visual Basic 14 Both were introduced through new Roslyn compiler in Visual Studio 2015.

  • C# 6.0:

    return "\{someVariable} and also \{someOtherVariable}" OR
    return $"{someVariable} and also {someOtherVariable}"

  • source: what's new in C#6.0

Noteworthy features (in Visual Studio 2015 IDE):

  • syntax coloring is supported - variables contained in strings are highlighted
  • refactoring is supported - when renaming, variables contained in strings get renamed, too
  • actually not only variable names, but expressions are supported - e.g. not only {index} works, but also {(index + 1).ToString().Trim()}

Enjoy! (& click "Send a Smile" in the VS)

deleted 11 characters in body
Source Link
miroxlav
  • 12.4k
  • 6
  • 66
  • 109

Interpolated strings were added into C# 6.0 and Visual Basic 14
#Interpolated strings were added into C# 6.0 and Visual Basic 14 (both were introduced in Visual Studio 2015)

Noteworthy features (in Visual Studio 2015):

  • syntax coloring is supported - variables contained in strings are highlighted
  • refactoring is supported - whemwhen renaming, variables contained in strings get renamed, too
  • actually not only variable names, but expressions are supported - e.g. not only {index} works, but also {(index + 1).ToString().Trim()} works, too

Enjoy! (& click "Send a Smile" in the VS)

Interpolated strings were added into C# 6.0 and Visual Basic 14
(both were introduced in Visual Studio 2015)

Noteworthy features (in Visual Studio 2015):

  • syntax coloring is supported - variables contained in strings are highlighted
  • refactoring is supported - whem renaming, variables contained in strings get renamed, too
  • actually not only variable names, but expressions are supported - e.g. not only {index} works, but {(index + 1).ToString().Trim()} works, too

Enjoy! (& click "Send a Smile" in the VS)

#Interpolated strings were added into C# 6.0 and Visual Basic 14 (both were introduced in Visual Studio 2015)

Noteworthy features (in Visual Studio 2015):

  • syntax coloring is supported - variables contained in strings are highlighted
  • refactoring is supported - when renaming, variables contained in strings get renamed, too
  • actually not only variable names, but expressions are supported - e.g. not only {index} works, but also {(index + 1).ToString().Trim()}

Enjoy! (& click "Send a Smile" in the VS)

added 52 characters in body
Source Link
miroxlav
  • 12.4k
  • 6
  • 66
  • 109

Interpolated strings were added into C# 6.0 and Visual Basic 14
(both were introduced in Visual Studio 2015)

Noteworthy features (in Visual Studio 2015):

  • syntax coloring is supported - variables contained in strings are highlighted
  • refactoring is supported - whem renaming, variables contained in strings get renamed, too
  • actually not only variable names, but expressions are supported - e.g. not only {index} works, but {(index + 1).ToString().Trim()} works, too

Enjoy! (& click "Send a Smile" in the VS)

Interpolated strings were added into C# 6.0 and Visual Basic 14

Noteworthy features (in Visual Studio 2015):

  • syntax coloring is supported - variables contained in strings are highlighted
  • refactoring is supported - whem renaming, variables contained in strings get renamed, too
  • actually not only variable names, but expressions are supported - e.g. not only {index} works, but {(index + 1).ToString().Trim()} works, too

Enjoy! (& click "Send a Smile" in the VS)

Interpolated strings were added into C# 6.0 and Visual Basic 14
(both were introduced in Visual Studio 2015)

Noteworthy features (in Visual Studio 2015):

  • syntax coloring is supported - variables contained in strings are highlighted
  • refactoring is supported - whem renaming, variables contained in strings get renamed, too
  • actually not only variable names, but expressions are supported - e.g. not only {index} works, but {(index + 1).ToString().Trim()} works, too

Enjoy! (& click "Send a Smile" in the VS)

added 420 characters in body
Source Link
miroxlav
  • 12.4k
  • 6
  • 66
  • 109
Loading
added 15 characters in body
Source Link
miroxlav
  • 12.4k
  • 6
  • 66
  • 109
Loading
Source Link
miroxlav
  • 12.4k
  • 6
  • 66
  • 109
Loading