SPFieldValueException constructor (SPListItem, SPField)

Initializes a new instance of the SPFieldValueException class with the specified list item and field.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Sub New ( _
    item As SPListItem, _
    field As SPField _
)
'Usage
Dim item As SPListItem
Dim field As SPField

Dim instance As New SPFieldValueException(item, field)
public SPFieldValueException(
    SPListItem item,
    SPField field
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

item or field is null .

Remarks

This exception is thrown when you attempt to set the value of a field in a list item to an invalid value, such setting your age to “abc” rather than using a numeric value. The code creates a new SPFieldValueException with item and field.

See also

Reference

SPFieldValueException class

SPFieldValueException members

SPFieldValueException overload

Microsoft.SharePoint namespace