Udostępnij za pośrednictwem


IDataErrorInfo.Error Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a message that describes any validation errors for the object.

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

Syntax

'Declaration
ReadOnly Property Error As String
string Error { get; }

Property Value

Type: System.String
The validation error on the object; or nulla null reference (Nothing in Visual Basic) or Empty, if no errors are present.

Remarks

Use the Error property to get a single validation error message for the entire object. This message can represent multiple errors. If you want to represent multiple errors with individual messages, implement the INotifyDataErrorInfo interface instead.

Examples

For an example of an implementation of this property, see the IDataErrorInfo class overview.

Version Information

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

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