Skip to content

Instantly share code, notes, and snippets.

@jhgbrt
Created September 1, 2021 12:20
Show Gist options
  • Save jhgbrt/fb66e1c95df7118078d05c25ac445471 to your computer and use it in GitHub Desktop.
Save jhgbrt/fb66e1c95df7118078d05c25ac445471 to your computer and use it in GitHub Desktop.
var output = $"FOO {nameof(R)} BAR " + $" {f(nameof(R))} BAZ ";
Console.WriteLine(output);
string f(string s) => s;
public class R
{
}
// when compiled as a net6 console app in VS2022 preview 3.1, the above code produces an unexpected result
// expected: "FOO R BAZ R BAR"
// actual : "BAR RFOO BAZ R"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment