WITH tblTemp as
(
SELECT ROW_NUMBER() Over(PARTITION BY Name,Department ORDER BY Name)
As RowNumber,* FROM <table_name>
)
DELETE FROM tblTemp where RowNumber >1
Nmbr is 0 and add 3 where Nmbr is 1.var title = String.Format("{0} ({1})", post.Title, post.Comments.Count);
1
| var title = $"{post.Title} ({post.Comments.Count})";So, you need to prefix your string with $ and then you can replace placeholders with the actual arguments. Isn’t that cleaner? |
1
2
3
4
5
| var dictionary = new Dictionary<string, string>{ { "LAX", "Los Angeles International Airport" }, { "MEL", "Melbourne Tullamarine Airport" }}; |
1
2
3
4
5
| var dictionary = new Dictionary<string, string>{ ["LAX"] = "Los Angeles International Airport", ["MEL"] = "Melbourne Tullamarine Airport"}; |