다음을 통해 공유


SPFieldLinkCollection.Delete Method (String)

Deletes the SPFieldLink object with the specified name from the collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Sub Delete ( _
    name As String _
)
'Usage
Dim instance As SPFieldLinkCollection
Dim name As String

instance.Delete(name)
public void Delete(
    string name
)

Parameters

  • name
    Type: System.String

    The name of the SPFieldLink object to delete. You can use either the internal name (the value of the SPFieldLink.Name property) or the display name (the value of the SPFieldLink.DisplayName property). When you pass the internal name you often get more reliable results, for two reasons. First, no two objects in the collection can have the same internal name, whereas two or more objects in the collection can have the same display name. Second, the Name property is read-only and therefore its value is immutable, whereas the DisplayName property can be modified by users with sufficient rights.

Remarks

If an object with the specified name is not found, the method takes no action.

Note

The object is not actually deleted until you call the SPContentType.Update method. As you make changes to a content type through the object model, your code actually makes those changes to the in-memory representation of the content type. Only when you call the Update method does SharePoint Foundation make the changes permanent, by writing them back to the content type definition that is stored in the database.

See Also

Reference

SPFieldLinkCollection Class

SPFieldLinkCollection Members

Delete Overload

Microsoft.SharePoint Namespace

Item[String]

SPFieldLink

SPContentType

Other Resources

Fields and Field References

Introduction to Columns