Created
October 12, 2021 15:33
-
-
Save richlander/42ea9d699a70ec9a1b60232ceea6734b to your computer and use it in GitHub Desktop.
const interpolated string example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net6.0</TargetFramework> | |
<ImplicitUsings>enable</ImplicitUsings> | |
<Nullable>enable</Nullable> | |
</PropertyGroup> | |
<ItemGroup> | |
<Using Include="System.Console" Static="True"/> | |
</ItemGroup> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const string Bar = "Bar"; | |
const string DoubleBar = $"{Bar}_{Bar}"; | |
WriteLine(DoubleBar); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Produces the following output: