ESRI.ArcGIS.ADF.IMS
FindByName(String) Method
See Also 
ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace > LayerCollection Class > FindByName Method : FindByName(String) Method




name
Name of layer to find.
Finds the first layer in the collection with a given name.

Syntax

Visual Basic (Declaration) 
Public Overloads Function FindByName( _
   ByVal name As String _
) As Layer
Visual Basic (Usage)Copy Code
Dim instance As LayerCollection
Dim name As String
Dim value As Layer
 
value = instance.FindByName(name)
C# 
public Layer FindByName( 
   string name
)

Parameters

name
Name of layer to find.

Return Value

The first layer in the collection with a given name, or null if no matching layer is found.

Example

Many classes in the ArcIMS Library Reference use this method to find a layer, such as FeatureLayer.CreateSelectionLayer(ESRI.ArcGIS.ADF.IMS.Geometry.Geometry, Renderer, string). See also FindByName(string, int).

Remarks

This finds a layer based on its Name property. Note that the Name of the layer need not be unique. If multiple layers share the same name, this method returns the first layer found with the name. The comparison is not case sensitive.

The returned layer is of type Layer. Cast the layer to the inherited type to access its specific properties, i.e., one of FeatureLayer, ImageLayer, or AcetateLayer.

See Also

© 2010 All Rights Reserved.