This is my cshtml file in WebMatrix (Razor syntax). Is there some way to output the suit symbols using something really short like @S? That is, I want to reduce @Html.Raw(S) to @S. Can it be done somehow? I tried what I thought it might look like for the club suit, but it didn’t work.
@{
var S = "♠";
var C = @"Html.Raw(""♣"")";
}
@Html.Raw(S) <br />
@C
<!-- output is
♠
Html.Raw("♣")
-->
==============================================
Thanks @GSerg I get ♣ ♦ ♥ ♠ with your code:
@{
var C = Html.Raw("♣");
var D = Html.Raw("♦");
var H = Html.Raw("♥");
var S = Html.Raw("♠");
}
@C @D @H @S
On the other hand,
does exactly the same.