ConfigurationElement.SetMetadata(String, Object) ConfigurationElement.SetMetadata(String, Object) ConfigurationElement.SetMetadata(String, Object) ConfigurationElement.SetMetadata(String, Object) Method

Definition

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 String String String

The name of the metadata to set.

value
Object Object Object 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          

Applies to