Share via


ModelMetadata.ModelType Property

 

Gets the type of the model.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

public Type ModelType { get; }
public:
property Type^ ModelType {
    Type^ get();
}
member ModelType : Type with get
Public ReadOnly Property ModelType As Type

Property Value

Type: System.Type

The type of the model.

Remarks

If the model came from a lambda expression, the model can be null and this property returns the type of the model.

See Also

ModelMetadata Class
System.Web.Mvc Namespace

Return to top