Partilhar via


QueryBasedCollection<T>.Item Property (String)

Gets an item by its Web-relative URL.

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

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    webRelativeUrl As String _
) As T
    Get
'Usage
Dim instance As QueryBasedCollection
Dim webRelativeUrl As String
Dim value As T

value = instance(webRelativeUrl)
public T this[
    string webRelativeUrl
] { get; }

Parameters

  • webRelativeUrl
    Type: System.String

    String that indicates the Web-relative URL of the item.

Property Value

Type: T
The item located by the Web-relative URL, or a null reference (Nothing in Visual Basic) if the value cannot be found.

Exceptions

Exception Condition
ArgumentException

The webRelativeUrl parameter cannot be a null reference (Nothing in Visual Basic) or an empty string.

ArgumentException

The webRelativeUrl is not valid.

See Also

Reference

QueryBasedCollection<T> Class

QueryBasedCollection<T> Members

Item Overload

Microsoft.SharePoint.Publishing Namespace

Item

Item