BuildItemGroup.Clone(Boolean) 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.
Creates a deep or shallow copy of the BuildItemGroup.
public:
Microsoft::Build::BuildEngine::BuildItemGroup ^ Clone(bool deepClone);
public Microsoft.Build.BuildEngine.BuildItemGroup Clone (bool deepClone);
member this.Clone : bool -> Microsoft.Build.BuildEngine.BuildItemGroup
Public Function Clone (deepClone As Boolean) As BuildItemGroup
Parameters
- deepClone
- Boolean
true
to create a deep copy of the BuildItemGroup; otherwise, false
.
Returns
A copy of the BuildItemGroup.
Remarks
A shallow copy of a BuildItemGroup references the same property group as the original. Modifications a shallow copy will be reflected in both copies.
A deep copy of a BuildItemGroup creates a new XML element to reference so that both copies of the BuildItemGroup can be independently modified.
If the BuildItemGroup corresponds directly to a element in the project (rather than corresponding to a collection of items created after evaluating wildcards in the Include
and Exclude
attributes of an Item
element), only deep copies are allowed.