是否可以在Rust中实现两个具有冲突方法名称的特征?我知道它会给你一个class RawCanvas extends React.Component<undefined, { data: number[] }> {
state: Readonly<{ data: number[] }> = {
data: []
}
}
错误,但是有办法解决这个问题吗?例如,某些语言允许您明确指定哪个方法应该优先
答案 0 :(得分:2)
你想要universal function call syntax。以下都是等效的:
@Html.DropDownListFor(p => p.PollSurveyId, Model.PollSurveyDetails, "Select Poll/Survey", new { @class = "form-control", required = "required", @id= "DDPollName" })
@Html.TextAreaFor(p => p.CategoryID, new {id= "cmbCategories" })
<div class="form-group">
@Html.Label("Is Anonymous")
@Html.CheckBoxFor(p => p.IsAnonymous)
</div>
</div>
<div class="col-lg-3">
<div class="form-group" id="ReportDiv">
@Html.Label("Show Report")
@Html.CheckBoxFor(p => p.ShowReport, new { id= "CBReport" })
</div>
<!-- /.col-lg-6 (nested) -->
</div>