Share via


FormsAuthenticationUserCollection.Clear メソッド

定義

コレクションからすべての FormsAuthenticationUser オブジェクトを削除します。

public:
 void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()

例外

コレクションは読み取り専用です。

Clear メソッドを使用するコード例を次に示します。

// Using method Clear.
formsAuthenticationCredentials.Users.Clear();
// Update if not locked
if (!authenticationSection.SectionInformation.IsLocked)
{
    configuration.Save();
}
' Using method Clear.
formsAuthenticationCredentials.Users.Clear()
' Update if not locked
If Not authenticationSection.SectionInformation.IsLocked Then
   configuration.Save()
End If

注釈

このメソッドは、 ディレクティブを clear 構成ファイルの適切なセクションに挿入して、上位レベルの構成ファイルで定義されている要素へのすべての参照をクリアします。 現在の構成ファイルの適切なセクションで定義されているすべての要素が削除されます。

適用対象