Udostępnij za pośrednictwem


InvalidEnumArgumentException Constructor (String, Int32, Type)

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

Initializes a new instance of the InvalidEnumArgumentException class with the specified argument name, value, and type.

Namespace:  System.ComponentModel
Assembly:  System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)

Syntax

'Declaration
Public Sub New ( _
    argumentName As String, _
    invalidValue As Integer, _
    enumClass As Type _
)
public InvalidEnumArgumentException(
    string argumentName,
    int invalidValue,
    Type enumClass
)

Parameters

  • argumentName
    Type: System.String
    The name of the argument that is not valid.
  • invalidValue
    Type: System.Int32
    The argument value that is not valid.
  • enumClass
    Type: System.Type
    The expected enumeration type.

Remarks

The following table shows the initial property values for an instance of InvalidEnumArgumentException.

Property

Value

InnerException

nulla null reference (Nothing in Visual Basic).

Message

nulla null reference (Nothing in Visual Basic).

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.