ASAs you cancan see the other attributes isare doing well,but but the shape of the feature throw an exception "Shape = "(pFeature).Shape" raises an exception of type "System.Runtime.InteropServices.COMException"" WHY. Why?
a = axMapControl1.get_Layer(j) as ICompositeLayer;
pfl = a.get_Layer(0) as IFeatureLayer;
IFeatureClass pfeatureclass = pfl.FeatureClass;
if (pfl != null)
{
IQueryFilter queryFilter = new QueryFilterClass
{
SubFields = "Id",
WhereClause = "Id = " + pointid
};
pFeatureSelection = pfl as IFeatureSelection;
pFeatureSelection.Clear();
pFeatureSelection.SelectFeatures(queryFilter, esriSelectionResultEnum.esriSelectionResultNew, true);
pSelectionSet = pFeatureSelection.SelectionSet;
IFeatureCursor pFeatureCursor = pfl.Search(queryFilter, true);
IFeature pFeature;
pFeature = pFeatureCursor.NextFeature();
a = axMapControl1.get_Layer(j) as ICompositeLayer;
pfl = a.get_Layer(0) as IFeatureLayer;
IFeatureClass pfeatureclass = pfl.FeatureClass;
if (pfl != null)
{
IQueryFilter queryFilter = new QueryFilterClass
{
SubFields = "Id",
WhereClause = "Id = " + pointid
};
pFeatureSelection = pfl as IFeatureSelection;
pFeatureSelection.Clear();
pFeatureSelection.SelectFeatures(queryFilter, esriSelectionResultEnum.esriSelectionResultNew, true);
pSelectionSet = pFeatureSelection.SelectionSet;
IFeatureCursor pFeatureCursor = pfl.Search(queryFilter, true);
IFeature pFeature;
pFeature = pFeatureCursor.NextFeature();