반응형
참고문서
https://docs.microsoft.com/ko-kr/dotnet/csharp/language-reference/tokens/interpolated
string name = "Mark"; var date = DateTime.Now; // Composite formatting: Console.WriteLine("Hello, {0}! Today is {1}, it's {2:HH:mm} now.", name, date.DayOfWeek, date); // String interpolation: Console.WriteLine($"Hello, {name}! Today is {date.DayOfWeek}, it's {date:HH:mm} now."); // Both calls produce the same output that is similar to: // Hello, Mark! Today is Wednesday, it's 19:40 now.
반응형
'C#' 카테고리의 다른 글
'No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' (4) | 2021.03.18 |
---|---|
.net framework를 이용한 SMTP에 파일첨부해서 보내기 (0) | 2019.01.09 |
SMTP로 메일 보내기 (0) | 2018.11.08 |
System.Drawing.Color Chart (0) | 2018.03.15 |
DataTable Sort(정렬) (0) | 2018.02.13 |
댓글