BuildPropertyGroup.Clone(Boolean) Method

Definition

Creates a deep or shallow copy of the BuildPropertyGroup.

public:
 Microsoft::Build::BuildEngine::BuildPropertyGroup ^ Clone(bool deepClone);
public Microsoft.Build.BuildEngine.BuildPropertyGroup Clone (bool deepClone);
member this.Clone : bool -> Microsoft.Build.BuildEngine.BuildPropertyGroup
Public Function Clone (deepClone As Boolean) As BuildPropertyGroup

Parameters

deepClone
Boolean

true to create a deep copy of the BuildPropertyGroup; otherwise, false.

Returns

A copy of the BuildPropertyGroup.

Remarks

A shallow copy of a BuildPropertyGroup references the same property group as the original. Modifications a shallow copy will be reflected in both copies.

A deep copy of a BuildPropertyGroup creates a new XML element to reference so that both copies of the BuildPropertyGroup can be independently modified.

If the BuildPropertyGroup corresponds directly to a element in the project (rather than corresponding to a collection of virtual properties, such as environment variable and global properties), only deep copies are allowed.

Applies to