public void getSelectedFeature()
{
try
{
IMap map = axMapControl1.Map;
ISelection selection = map.FeatureSelection;
IEnumFeatureSetup iEnumFeatureSetup = (IEnumFeatureSetup)selection;
iEnumFeatureSetup.AllFields = true;
IEnumFeature enumFeature = (IEnumFeature)iEnumFeatureSetup;
enumFeature.Reset();
IFeature feature = enumFeature.Next();
while (feature != null)
{
string hehe = feature.get_Value(5).ToString();
MessageBox.Show(hehe);
feature = enumFeature.Next();
}
}
catch (Exception e)
{
}
}
07-22
08-24
949