public IPolygon CreatePolygonFromEnvelope(IEnvelope envelope)
{
// Build a polygon from a sequence of points.
IGeometryBridge2 geometryBridge2 = new GeometryEnvironmentClass();
IPointCollection4 pointCollection4 = new PolygonClass();
// Define the point collection; i.e. polygon verticies
List<WKSPoint> wksPoints = new List<WKSPoint>();
wksPoints.Add(new WKSPoint() { X = envelope.LowerLeft.X, Y = envelope.LowerLeft.Y });
wksPoints.Add(new WKSPoint() { X = envelope.UpperLeft.X, Y = envelope.UpperLeft.Y });
wksPoints.Add(new WKSPoint() { X = envelope.UpperRight.X, Y = envelope.UpperRight.Y });
wksPoints.Add(new WKSPoint() { X = envelope.LowerRight.X, Y = envelope.LowerRight.Y });
geometryBridge2.SetWKSPoints(pointCollection4, wksPoints.ToArray());
// Cast point collection to IPolygon
IPolygon polygon = pointCollection4 as IPolygon;
polygon.SpatialReference = envelope.SpatialReference;
polygon.SimplifyPreserveFromTo();
return polygon;
}