ProjectItem.RemoveMetadata(String) 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.
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.