NShape Reference
RenameLayer Method

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape.Advanced > ILayerCollection Interface >

NShape Reference
RenameLayer Method

Previous pageReturn to chapter overviewNext page

Renames a layer.

Syntax

bool RenameLayer(string previousName, string newName)

Description

Rename the layer with the specified name.

Return Value

True, if the layer with the name previousName was found and successfully renamed. False, if a layer with the previous name does not exist.

Parameters

Name

Description

previousName

Name of the layer to rename.

newName

The new name for the specified layer.

Exceptions

Exception

Condition

ArgumentNullException

Parameter previousName is null or empty.

Parameter newName is null or empty.

ArgumentException

A layer with the same name as newName already exists in the collection