OutputCacheProfileCollection.Remove(String) Metod

Definition

Tar bort objektet OutputCacheProfile med det angivna namnet från samlingen.

public:
 void Remove(System::String ^ name);
public void Remove(string name);
member this.Remove : string -> unit
Public Sub Remove (name As String)

Parametrar

name
String

Namnet på elementet som OutputCacheProfile ska tas bort från samlingen.

Undantag

Det finns inget OutputCacheProfile objekt med den angivna nyckeln i samlingen, elementet har redan tagits bort eller samlingen är skrivskyddad.

Exempel

I följande kodexempel visas hur metoden Remove används.

// Remove the output profile with the specified name.
outputCacheProfiles.Remove("MyCacheProfile");
' Remove the output profile with the specified name.
  outputCacheProfiles.Remove("MyCacheProfile")

Kommentarer

Metoden Remove infogar ett remove element i lämplig del av konfigurationsfilen för alla element som definierats i en konfigurationsfil på högre nivå. Om elementet definieras i lämpligt avsnitt i den aktuella konfigurationsfilen tas dess post bort från konfigurationsfilen. Det objekt som ska tas bort måste finnas i samlingen.

Gäller för

Se även