I discovered that I can use string.Join(", ", string[] enumerable)
to turn a list of strings into a single comma delimited string. Could I do something similar to produce for example a list of hyperlinks in a Razor View? Instead of something like:
@foreach(var item in enumerable)
{
<a href="@item.Url">@item.Title</a>
if(item != enumerable.Last()) { <span>, </span> }
}
And if so, would it be advisable or should I just stop being lazy?