This documentation is archived and is not being maintained.

ValidationError Class

Represents the base class for all validation errors.

System::Object
  System.Workflow.ComponentModel.Compiler::ValidationError

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

[SerializableAttribute]
public ref class ValidationError sealed

The ValidationError type exposes the following members.

  NameDescription
Public methodValidationError(String, Int32)Initializes a new instance of the ValidationError class; initializes the error text and error numbers for this instance.
Public methodValidationError(String, Int32, Boolean)Initializes a new instance of the ValidationError class, initializes the error text, error number and error type for this instance.
Public methodValidationError(String, Int32, Boolean, String)Initializes a new instance of the ValidationError class, initializing the error text, the error number, the error type and the property name associated with the error.
Top

  NameDescription
Public propertyErrorNumberGets the error number of this instance.
Public propertyErrorTextGets the error text for this instance.
Public propertyIsWarningGets a value that indicates whether this instance is a warning.
Public propertyPropertyNameGets or sets the name of the property that failed to validate.
Public propertyUserDataGets an IDictionary for the definition and storage of user-defined data related to this instance.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodStatic memberGetNotSetValidationErrorCreates a new validation error defined for the error type of a property not being set.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringProvides a string representation of this instance incorporating the error type (error or warning) the error number and the error text. (Overrides Object::ToString().)
Top

The following example shows how to create and manipulate validation errors as part of a custom validation routine.

This code example is part of the Send Mail SDK Sample and is from the SendEMailActivity.cs file. For more information, see Send Mail Activity.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: