This document is archived and information here might be outdated.  Recommended version.


IPlaceCollection.RemoveByName Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IP > IPlaceCollection Interface > IPlaceCollection.RemoveByName Method
ArcGIS Developer Help

IPlaceCollection.RemoveByName Method

Remove from place collection. If RemoveMatching is true, all places will be removed whose name matches the unique name generation pattern. Otherwise place is removed if the name is an exact match.

[Visual Basic .NET]
Public Function RemoveByName ( _
    ByVal Name As String, _
    ByVal RemoveMatching As Boolean _
) As Integer
[C#]
public int RemoveByName (
    string Name,
    bool RemoveMatching
);
[C++]
HRESULT RemoveByName(
  BSTR Name,
  VARIANT_BOOL RemoveMatching
);
[C++]
Parameters
Name [in]

Name is a parameter of type BSTR RemoveMatching [in]
RemoveMatching is a parameter of type bool

Product Availability

Available with ArcGIS Engine.

Description

Removes the Place object with the specified IPlace::Name from the collection. Returns the number of Place objects removed.

removeMatching specifies whether Place objects with IPlace::Name properties matching the following pattern will be removed: "My Place", "My Place [2]" and "My Place [3]". Place objects are added to the collection with this pattern when allowChangeName is passed as true to the Add method.

See Also

IPlaceCollection Interface