Export (0) Print
Expand All

DataTypeAttribute.GetDataTypeName Method

Retrieves the name of the data type that is associated with the member.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

public virtual string GetDataTypeName()

Return Value

Type: System.String
The value of the CustomDataType property if the DataType property is set to Custom; otherwise, the name of the value in the DataType property.

ExceptionCondition
InvalidOperationException

DataType is set to Custom, but CustomDataType does not contain a value.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft