次の方法で共有


ProjectElement.Condition Property

Definition

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.

Applies to