SPField constructor (SPFieldCollection, String, String)

Initializes a new instance of the SPField class based on the specified field collection object, field type, and field name.

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

public SPField(
	SPFieldCollection fields,
	string typeName,
	string displayName
)

Parameters

fields
Type: Microsoft.SharePoint.SPFieldCollection

The field collection to which this field is added.

typeName
Type: System.String

The name of the field type, which represents an SPFieldType value.

displayName
Type: System.String

The display name of the field.

ExceptionCondition
ArgumentNullException

fields is null .

-or-

typeName is empty or null .

-or-

displayName is empty or null .

Show: