Export (0) Print
Expand All

ProjectElementContainer.InsertBeforeChild Method

Inserts the child element before the reference element.

Namespace:  Microsoft.Build.Construction
Assembly:  Microsoft.Build (in Microsoft.Build.dll)

public void InsertBeforeChild(
	ProjectElement child,
	ProjectElement reference
)

Parameters

child
Type: Microsoft.Build.Construction.ProjectElement

The project element to be inserted.

reference
Type: Microsoft.Build.Construction.ProjectElement

The project element to be inserted before.

If the reference element is null, this method is equivalent to AppendChild.

Throws an exception if this project container is not parented, or if the child element is already parented, or if the child element was created by a different ProjectRootElement, or if the reference element is not a child of this project container.

.NET Framework

Supported in: 4.5, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft