MVC DropDownList绑定数据 Razor页面

# 做数据绑定的时候,会有下拉框选择性别是和否。 不需要再写后端代码,之间读取前段的TEXT值,下面这条语句有BUG,求大神帮我看看

@Html.DropDownList(model => model.Empty, new List() { new SelectListItem() { Text = "是", Selected = true } }, { new SelectListItem() { Text = "否" } })


https://www.cnblogs.com/cxd4321/archive/2009/09/24/1573026.html

只看语法错误的话是多了}和{
list里面包含了2个SelectListItem选项
@Html.DropDownList(
model => model.Empty,
new List() {
new SelectListItem() { Text = "是", Selected = true } ,
new SelectListItem() { Text = "否" }
}
)