Having trouble converting an Ilayer to an IPolygon.
I am developing a toolbar for ArcMap and I grab a layer via code from the side table of contents. The Layer is a Polygon, but the code won't convert it to a IPolygon.
Can anyone help me out? This is the code I am using to try and convert it to a IPolygon...
IPolygon poly = m_document.Maps.get_Item(0).get_Layer(0) as IPolygon;
I can do this:
ILayer layer = m_document.Maps.get_Item(0).get_Layer(0) as ILayer;
And that works, just not converting it to a IPloygon..