ProjectElement.Condition Property
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.
Gets or sets the Condition value. It will return empty string IFF a condition attribute is legal but it’s not present or has no value. It will return null IFF a Condition attribute is illegal on that element. Removes the attribute if the value to set is empty. It is possible for derived classes to throw an InvalidOperationException if setting the condition is not applicable for those elements.
public:
virtual property System::String ^ Condition { System::String ^ get(); void set(System::String ^ value); };
public virtual string Condition { get; set; }
member this.Condition : string with get, set
Public Overridable Property Condition As String
Property Value
The Condition attribute value, or an empty string if the attribute is not present.
Examples
For the "ProjectExtensions" element, the getter returns null and the setter throws an exception for any value.
Remarks
Removes the Condition attribute if the value to set is set to null or an empty string. If the Condition attribute is not present, returns an empty string instead of throwing an exception because a nonexistent condition is implicitly true
For the "ProjectExtensions" element, the getter returns null and the setter throws an exception for any value.