Partilhar via


SPLinkCollection Class

Represents a collection of Microsoft.SharePoint.SPLink objects.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.SPLinkCollection

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

Syntax

'Declaration
<SubsetCallableTypeAttribute> _
Public NotInheritable Class SPLinkCollection _
    Inherits SPBaseCollection
'Usage
Dim instance As SPLinkCollection
[SubsetCallableTypeAttribute]
public sealed class SPLinkCollection : SPBaseCollection

Remarks

Use the BackwardLinks or ForwardLinks property of the SPFile or SPListItem class to return the collection of backward or forward links for the file or list item, respectively. Backward links go from other pages to a file or list item, while forward links go from a file to other pages. Use an indexer to return a single item from the collection. For example, if the collection is assigned to a variable named myLinks, use myLinks[index] in Microsoft Visual C# or myLinks(index) in Microsoft Visual Basic, where index is the index number of the item in the collection.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPLinkCollection Members

Microsoft.SharePoint Namespace