Share via


SPLink Class

Describes a link to or from a document or regular list item.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.SPLink

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

Syntax

<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public NotInheritable Class SPLink

Dim instance As SPLink
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public sealed class SPLink

Remarks

The SPLink class can represent either a forward link, which goes from a file or list item to other pages, or a backward link, which goes from other pages to a file or list item. A forward link contains more information than a backward link.

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. 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

SPLink Members

Microsoft.SharePoint Namespace