{
IFeatureCursor pFeatureCursor = _featureClass.Insert(true);
IFeatureBuffer pFeatureBuffer = _featureClass.CreateFeatureBuffer();
object missing = Type.Missing;
IPointCollection points = new RingClass();
IPoint pt1 = new PointClass();
pt1.X = 0;
pt1.Y = 0;
points.AddPoint(pt1, ref missing, ref missing);
IPoint pt2 = new PointClass();
pt2.X = 0;
pt2.Y = 1;
points.AddPoint(pt2, ref missing, ref missing);
IPoint pt3 = new PointClass();
pt3.X = 1;
pt3.Y = 1;
points.AddPoint(pt3, ref missing, ref missing);
IPoint pt4 = new PointClass();
pt4.X = 1;
pt4.Y = 0;
points.AddPoint(pt4, ref missing, ref missing);
IPoint pt5 = new PointClass();
pt5.X = 0;
pt5.Y = 0;
points.AddPoint(pt5, ref missing, ref missing);
MultipointClass mp = points as MultipointClass;
IRing ring = points as IRing;
ISegmentCollection SegCol = ring as ISegmentCollection;
IPolygon pPolygon = new PolygonClass();
ISegmentCollection newSegCol = pPolygon as ISegmentCollection;
newSegCol.AddSegmentCollection(SegCol);
pFeatureBuffer.Shape = pPolygon;
pFeatureCursor.InsertFeature(pFeatureBuffer);
pFeatureCursor.Flush();
}