Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Delete method of the SPFieldCollection class deletes the field with the specified internal name from the collection.
Parameters
strName A string that specifies the internal name of the field.
Example
The following code example deletes the field with the specified name from the Events list in all the subsites under a specified site.
This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security