Aracılığıyla paylaş


ProjectInstance.GetPropertyValue(String) Method

Definition

Get the value of a property in this project, or an empty string if it does not exist.

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

Parameters

name
String

The name of the property whose value is to be retrieved.

Returns

The value of the property with the given name, or an empty string if no property exists with that name. The value returned has no escaped character sequences.

Remarks

A property with a value of empty string and no property at all are not distinguished between by this method. This is because the build does not distinguish between the two. The reason this method exists when users can simply do GetProperty(..).EvaluatedValue, is that the caller would have to check for null every time. For properties, empty and undefined are not distinguished, so it much more useful to also have a method that returns empty string in either case. This function returns the unescaped value.

Applies to