共用方式為


ModelBindingContext.ModelState 屬性

定義

取得或設定 , ModelStateDictionary 用於在系結時擷取 ModelStateEntry 模型物件圖形中屬性的值。

public:
 abstract property Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ ModelState { Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ get(); void set(Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ value); };
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get; set; }
member this.ModelState : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary with get, set
Public MustOverride Property ModelState As ModelStateDictionary

屬性值

備註

屬性 setter 僅供單元測試之用。

適用於