Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Initialize Method
Collapse the table of content
Expand the table of content

ProviderBase.Initialize Method

Initializes the provider.

Namespace:  System.Configuration.Provider
Assembly:  System.Configuration (in System.Configuration.dll)

Public Overridable Sub Initialize ( _
	name As String, _
	config As NameValueCollection _


Type: System.String

The friendly name of the provider.

Type: System.Collections.Specialized.NameValueCollection

A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.


The name of the provider is Nothing.


The name of the provider has a length of zero.


An attempt is made to call Initialize on a provider after the provider has already been initialized.

The base class implementation internally tracks the number of times the provider's Initialize method has been called. If a provider is initialized more than once, an InvalidOperationException is thrown stating that the provider is already initialized.

Because most feature providers call Initialize prior to performing provider-specific initialization, this method is a central location for preventing double initialization.

For an example of how to use Initialize, see Profile Provider Implementation Example.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft