Modifier

Partager via


PersonalizationStateInfoCollection.Item[] Property

Definition

Gets an element from the collection based on the specified parameters.

Overloads

Item[Int32]

Gets a PersonalizationStateInfo instance located at the specified ordinal index in the collection.

Item[String, String]

Gets an element from the collection based on the specified parameters.

Item[Int32]

Gets a PersonalizationStateInfo instance located at the specified ordinal index in the collection.

public:
 property System::Web::UI::WebControls::WebParts::PersonalizationStateInfo ^ default[int] { System::Web::UI::WebControls::WebParts::PersonalizationStateInfo ^ get(int index); };
public System.Web.UI.WebControls.WebParts.PersonalizationStateInfo this[int index] { get; }
member this.Item(int) : System.Web.UI.WebControls.WebParts.PersonalizationStateInfo
Default Public ReadOnly Property Item(index As Integer) As PersonalizationStateInfo

Parameters

index
Int32

The ordinal index of the object to be retrieved.

Property Value

A PersonalizationStateInfo instance located at the specified ordinal index in the collection.

Exceptions

index is less than zero.

-or-

index is greater than Count.

Remarks

This property retrieves the PersonalizationStateInfo instance located at the specified ordinal index in the collection.

Applies to

Item[String, String]

Gets an element from the collection based on the specified parameters.

public:
 property System::Web::UI::WebControls::WebParts::PersonalizationStateInfo ^ default[System::String ^, System::String ^] { System::Web::UI::WebControls::WebParts::PersonalizationStateInfo ^ get(System::String ^ path, System::String ^ username); };
public System.Web.UI.WebControls.WebParts.PersonalizationStateInfo this[string path, string username] { get; }
member this.Item(string * string) : System.Web.UI.WebControls.WebParts.PersonalizationStateInfo
Default Public ReadOnly Property Item(path As String, username As String) As PersonalizationStateInfo

Parameters

path
String

The relative application path of the personalization state object to be retrieved.

username
String

The user name of the UserPersonalizationStateInfo object to be retrieved.

Property Value

An element from the collection based on the specified parameters.

Exceptions

path is null.

Remarks

This property is the default indexer for the collection. If only path is provided, the property returns a SharedPersonalizationStateInfo instance. If both path and username are provided, the property returns a UserPersonalizationStateInfo instance for the combination of path and username.

If path (in the case that username is set to null) does not exist, or if username and path do not exist, null is returned.

Applies to