PersonalizationStateInfoCollection.Item[] 属性
定义
根据指定的参数从集合中获取元素。Gets an element from the collection based on the specified parameters.
重载
| Item[Int32] |
获取集合中指定序号索引处的 PersonalizationStateInfo 实例。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]
获取集合中指定序号索引处的 PersonalizationStateInfo 实例。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
参数
- index
- Int32
要检索的对象的序号索引。The ordinal index of the object to be retrieved.
属性值
一个位于集合中指定序号索引处的 PersonalizationStateInfo 实例。A PersonalizationStateInfo instance located at the specified ordinal index in the collection.
例外
index 小于零。index is less than zero.
注解
此属性检索 PersonalizationStateInfo 位于集合中指定序号索引处的实例。This property retrieves the 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.
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
参数
- path
- String
要检索的个性化设置状态对象的相对应用程序路径。The relative application path of the personalization state object to be retrieved.
- username
- String
要检索的 UserPersonalizationStateInfo 对象的用户名。The user name of the UserPersonalizationStateInfo object to be retrieved.
属性值
一个元素来自于这个集合,该集合基于指定的参数。An element from the collection based on the specified parameters.
例外
path 为 null。path is null.
注解
此属性是集合的默认索引器。This property is the default indexer for the collection. 如果仅 path 提供,则属性返回一个 SharedPersonalizationStateInfo 实例。If only path is provided, the property returns a SharedPersonalizationStateInfo instance. 如果同时 path username 提供了和,则属性将返回 UserPersonalizationStateInfo 和的组合的实例 path username 。If both path and username are provided, the property returns a UserPersonalizationStateInfo instance for the combination of path and username.
如果 path 在 username 设置为) 的情况下 (null 不存在,或者如果不 username 存在, path null 则返回。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.