ProviderCollection.SetReadOnly Método

Definição

Define a coleção como sendo somente leitura.Sets the collection to be read-only.

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

Comentários

A ProviderCollection classe é de leitura/gravação por padrão.The ProviderCollection class is read/write by default. O SetReadOnly método torna a coleção somente leitura.The SetReadOnly method makes the collection read-only. Depois que uma coleção é definida como somente leitura, algumas chamadas de método (como Remove e Add resultarão em uma exceção.After a collection is set to read-only, some method calls (such as Remove and Add will result in an exception.

Observe que a maioria dos recursos baseados em provedor definirá seu ProviderCollection objeto como somente leitura após a criação de instâncias de todos os provedores configurados.Note that most provider-based features will set their ProviderCollection object to read-only after creating instances of all of the configured providers.

Aplica-se a