Implement propper commenting in blazor, please
This issue has been moved from a ticket on Developer Community.
You can't comment a section if you already have a comment in it. It works in c#, it doesn't in blazor. Please implement it.
@* <PropertyColumn Property="@(c => c.Description)" Align="Align.Start" Title="Description" /> <PropertyColumn Property="@(c => c.DateCreated.ToString("dd.MM.yyyy HH:mm"))" Align="Align.Start" Sortable="true" Title="Created" /> @* TODO: DATE sorting, not string. *@ <PropertyColumn Property="@(c => c.CountryCode)" Align="Align.Center" Title="Country code" /> * @
Original Comments
Feedback Bot on 1/31/2024, 09:32 PM:
(private comment, text removed)
It works in c#
I'm afraid it doesn't:
Single line comments work like this in C#, but Razor has no concept of single line comments.
Razor has no concept of single line comments.
I guess you could do something like:
@{
//<PropertyColumn Property="@(c => c.DateCreated.ToString("dd.MM.yyyy HH:mm"))" Align="Align.Start" Sortable="true"
//Title="Created" /> @* TODO: DATE sorting, not string. *@
}
It occurs to me this could be a tooling request, not a compiler one, and when they say "you can't comment a section", they could mean the actual act of commenting code.
When executing the "Toggle Block Comment" command in VS, Roslyn will handle any block comments in the span such that the result is valid:
Razor, due to the VS editor handling the commenting for us, has no functionality for this, and cannot currently add it. This is potentially something we need to get the editor to look at.
EDIT: Been at Microsoft too long, used the word "ask" as a noun. Fixed.