捕捉到comexception
调试程序时捕捉到下这个异常,求帮助...这里是程序代码,执行第一句后直接跳入到catch。
程序代码:
public static Features SearchLayerFeature(AxMap axMap, double X, double Y, string LayerName, float Radius) { Layer layer = null; try { layer = axMap.Layers.Item(LayerName); MapXLib.Point source = new PointClass(); source.Set(X, Y); return layer.SearchWithinDistance(source, (double) Radius, 7, 1); } catch { return null; } }