Share via


AssociatedMetadataProvider.GetMetadataForProperty Method (Func<Object>, Type, String)

Returns the metadata for the specified property using the container type and property name.

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

Syntax

'Declaration
Public Overrides Function GetMetadataForProperty ( _
    modelAccessor As Func(Of Object), _
    containerType As Type, _
    propertyName As String _
) As ModelMetadata
public override ModelMetadata GetMetadataForProperty(
    Func<Object> modelAccessor,
    Type containerType,
    string propertyName
)
public:
virtual ModelMetadata^ GetMetadataForProperty(
    Func<Object^>^ modelAccessor, 
    Type^ containerType, 
    String^ propertyName
) override

Parameters

  • containerType
    Type: System.Type
    The type of the container.

Return Value

Type: System.Web.Mvc.ModelMetadata
The metadata for the specified property.

See Also

Reference

AssociatedMetadataProvider Class

GetMetadataForProperty Overload

System.Web.Mvc Namespace