DataTypeAttribute.GetDataTypeName Method
Microsoft Silverlight will reach end of support after October 2021. Learn more.
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)
Syntax
'Declaration
Public Overridable Function GetDataTypeName As String
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.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | DataType is set to Custom, but CustomDataType does not contain a value. |
Version Information
Silverlight
Supported in: 5, 4, 3
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also