ProjectItem.GetMetadataValue(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.
Get the evaluated value of a metadata on this item, possibly from an item definition. Returns empty string if it does not exist. To determine whether a piece of metadata does not exist vs. simply has no value, use HasMetadata. May be used to access the value of built-in metadata, such as "FullPath". Attempting to get built-in metadata on a value that is not a valid path throws InvalidOperationException.
public:
virtual System::String ^ GetMetadataValue(System::String ^ name);
public string GetMetadataValue (string name);
abstract member GetMetadataValue : string -> string
override this.GetMetadataValue : string -> string
Public Function GetMetadataValue (name As String) As String
Parameters
- name
- String
The name of the metadata whose value is retrieved.
Returns
The evaluated value of the given metadata for this item, including metadata originating from an item definition, or an empty string if no metadata exists with the given name.
Remarks
To determine whether metadata exist, whether it has a value or not, use HasMetadata.
This method may be used to access the value of built-in metadata, such as "FullPath".