C# 實(shí)例 Switch 條件

c# 實(shí)例

switch 條件

@{
var message="";
var weekday=datetime.now.dayofweek;
var day=weekday.tostring()
}
<html>
<body>
@switch(day)
{
case "monday":
    message="this is the first weekday.";
    break;
case "thursday":
    message="only one day before weekend.";
    break;
case "friday":
    message="tomorrow is weekend!";
    break;
default:
    message="today is " + day;
    break;
}
<p>@message</p>
</body>
</html>

相關(guān)文章
亚洲国产精品第一区二区,久久免费视频77,99V久久综合狠狠综合久久,国产免费久久九九免费视频