ProjectItem.RemoveMetadata(String) Method

Definition

Removes any metadata with the specified name. Returns true if the evaluated metadata existed, otherwise false. If the metadata name is one of the built-in metadata, like "FullPath", throws InvalidArgumentException. If the metadata originates in an item definition, and was not overridden, throws InvalidOperationException.

public:
 bool RemoveMetadata(System::String ^ name);
public bool RemoveMetadata (string name);
member this.RemoveMetadata : string -> bool
Public Function RemoveMetadata (name As String) As Boolean

Parameters

name
String

The name of the metadata to remove.

Returns

true if metadata with the given name exists before removal; otherwise, false.

Remarks

Throws InvalidArgumentException if the metadata name refers to built-in metadata, like "FullPath".

Throws InvalidOperationException if the metadata name refers to metadata that originates from an item definition.

Applies to