AuthorizationRuleCollection.Remove(AuthorizationRule) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
AuthorizationRule オブジェクトをコレクションから削除します。
public:
void Remove(System::Web::Configuration::AuthorizationRule ^ rule);
public void Remove(System.Web.Configuration.AuthorizationRule rule);
member this.Remove : System.Web.Configuration.AuthorizationRule -> unit
Public Sub Remove (rule As AuthorizationRule)
パラメーター
- rule
- AuthorizationRule
削除する AuthorizationRule オブジェクト。
例外
渡された AuthorizationRule オブジェクトがコレクションに存在しないか、要素が既に削除されているか、コレクションが読み取り専用です。
例
次のコード例は、 Remove メソッドの使用方法を示しています。 コレクションを取得する方法については、 AuthorizationSection クラスのトピックのコード例を参照してください。
// Remove the rule from the collection.
authorizationSection.Rules.Remove(authorizationRule);
' Remove the rule from the collection.
authorizationSection.Rules.Remove(authorizationRule)
注釈
このメソッドは、上位レベルの構成ファイルで定義されているすべての要素の構成ファイルの適切なセクションに、 remove 要素を挿入します。 要素が現在の構成ファイルの適切なセクションで定義されている場合、そのエントリは構成ファイルから削除されます。 削除するオブジェクトはコレクション内に存在する必要があります。