Share via


StringLengthValidationException Constructor (String, String, Int32, Int32, Int32)

Initializes a new instance of the StringLengthValidationException class with a specified message and the specified parameters.

Namespace:  Microsoft.CommerceServer
Assembly:  Microsoft.CommerceServer.CrossTierTypes (in Microsoft.CommerceServer.CrossTierTypes.dll)

Syntax

'Declaration
Public Sub New ( _
    message As String, _
    propertyName As String, _
    minLength As Integer, _
    maxLength As Integer, _
    actualLength As Integer _
)
'Usage
Dim message As String
Dim propertyName As String
Dim minLength As Integer
Dim maxLength As Integer
Dim actualLength As Integer

Dim instance As New StringLengthValidationException(message, _
    propertyName, minLength, maxLength, _
    actualLength)
public StringLengthValidationException(
    string message,
    string propertyName,
    int minLength,
    int maxLength,
    int actualLength
)
public:
StringLengthValidationException(
    String^ message, 
    String^ propertyName, 
    int minLength, 
    int maxLength, 
    int actualLength
)
public function StringLengthValidationException(
    message : String, 
    propertyName : String, 
    minLength : int, 
    maxLength : int, 
    actualLength : int
)

Parameters

  • message
    Type: System..::.String
    The error message that explains the reason for the exception.
  • propertyName
    Type: System..::.String
    Name of the property that violated the range constraint.
  • minLength
    Type: System..::.Int32
    Minimum value allowed for this property (represented in string).
  • maxLength
    Type: System..::.Int32
    Maximum value allowed for this property (represented in string).
  • actualLength
    Type: System..::.Int32
    Actual value of this property (represented in string).

Remarks

StringLengthValidationException is thrown when an attempt is made to save an entity and at least one string property of that entity is not within the allowed length.

Permissions

See Also

Reference

StringLengthValidationException Class

StringLengthValidationException Members

StringLengthValidationException Overload

Microsoft.CommerceServer Namespace