You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @Vespiyanus, thank you for raising this concern. Yes, I can see how it might be confusing to newbies. All of a sudden new and unfamiliar syntax is being used without any details about its usage.
I've added the "up-for-grabs" label on this issue, so that anyone could work on it before we have a chance to. To answer the ask, the $" is used for formatting strings, and is called string interpolation.
What it does, is format expressions within the string. It tells the C# compiler that the string should evaluate the expressions and then concatenate the pieces together.
Activity
IEvangelist commentedon May 28, 2020
Hi @Vespiyanus, thank you for raising this concern. Yes, I can see how it might be confusing to newbies. All of a sudden new and unfamiliar syntax is being used without any details about its usage.
I've added the "up-for-grabs" label on this issue, so that anyone could work on it before we have a chance to. To answer the ask, the
$"is used for formatting strings, and is called string interpolation.What it does, is format expressions within the string. It tells the C# compiler that the string should evaluate the expressions and then concatenate the pieces together.
This is essentially shorthand for this
"Area = " + (rad * rad * Math.PI).ToString("F2")The query could then be iterated on, and it's just a string collection with the following values:
jmarkman commentedon Jun 1, 2020
I'd like to take a crack at refactoring this particular section to provide a bit more clarity for newer readers, if that's alright.
IEvangelist commentedon Jun 2, 2020
Hi @jmarkman - absolutely. Thank you