This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IP > IPlaceCollection Interface > IPlaceCollection.RemoveByName Method (ArcObjects .NET 10.5 SDK) |
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,
long* pRemovedCount
);
[C++]
Parameters Name [in] Name is a parameter of type BSTR RemoveMatching [in] RemoveMatching is a parameter of type VARIANT_BOOL pRemovedCount [out, retval] pRemovedCount is a parameter of type long
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.