共用方式為


IHttpSessionState.RemoveAt(Int32) 方法

定義

從工作階段狀態項目集合中刪除指定索引處的項目。

public:
 void RemoveAt(int index);
public void RemoveAt (int index);
abstract member RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

參數

index
Int32

要從工作階段狀態集合移除的項目索引。

範例

下列程式碼範例會 RemoveAt 實作 介面的 IHttpSessionState 方法,依數值索引從內部會話狀態專案集合中刪除會話狀態專案。

public void RemoveAt(int index)
{
  pSessionItems.RemoveAt(index);
}
Public Sub RemoveAt(index As Integer) Implements IHttpSessionState.RemoveAt    
  pSessionItems.RemoveAt(index)
End Sub

適用於

另請參閱