ConfigurationElement.SetMetadata(String, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets metadata values from the element schema.
public:
void SetMetadata(System::String ^ metadataType, System::Object ^ value);
public void SetMetadata (string metadataType, object value);
member this.SetMetadata : string * obj -> unit
Public Sub SetMetadata (metadataType As String, value As Object)
Parameters
- metadataType
- String
The name of the metadata to set.
- value
- Object
The new value of the metadata.
Examples
The following example sets the metadata value. The lockItem
value is set to true
and is persisted to the Administration.config file.
// Set the element's lockItem attribute.
moduleproviderelement.SetMetadata("lockItem", true); // persisted in Administration.config