this might be a trivial question for the experienced programmers, however I came across this line of code and want to understand what it does. please see the code below where we are adding the in the entries list and also incrementing the count as well.
public class Journal
{
private readonly List<string> entries = new List<string>();
private static int count = 0;
public int AddEntry(string text)
{
entries.Add($"{++count}: {text}"); // my question is about this line of code
return count;
}
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
what is the purpose of doller sign in the mentioned line.