What do dollar symbols in C# Code mean?
问题 Today, I pull the code from my client, and I get an error in this line. throw new Exception($"One or more errors occurred during removal of the company:{Environment.NewLine}{Environment.NewLine}{exc.Message}"); This line also moreCompanies = $"{moreCompanies},{databaseName}"; The $ symbols is so weird with me. This is C# code. 回答1: The $ part tells the compiler that you want an interpolated string. Interpolated strings are one of the new features of C# 6.0. They allow you to substitute