IFeatureLayer pf = axMapControl1.get_Layer(3) as IFeatureLayer;
IFeature pff = pf.FeatureClass.GetFeature(2);
IObject ob = pff as IObject;
for (int i = 0; i < axMapControl1.LayerCount;i++ )
{
if (ob.Table.Equals(((axMapControl1.get_Layer(i) as IFeatureLayer).FeatureClass)))
MessageBox.Show(i.ToString());
}
浙公网安备 33010602011771号