ArcGIS Pro 2.7 API Reference Guide
CreateEnvelope(MapPoint,MapPoint,SpatialReference) Method
Example 

ArcGIS.Core.Geometry Namespace > EnvelopeBuilder Class > CreateEnvelope Method : CreateEnvelope(MapPoint,MapPoint,SpatialReference) Method
Lower left corner of the envelope.
Upper right corner of the envelope.
(Optional) The SpatialReference. The default value is null. If spatialReference is null, then the spatial reference is inherited from minPoint or maxPoint.
Convenience method to create a new instance of the Envelope class.
Syntax
Public Overloads Shared Function CreateEnvelope( _
   ByVal minPoint As MapPoint, _
   ByVal maxPoint As MapPoint, _
   Optional ByVal spatialReference As SpatialReference _
) As Envelope

Parameters

minPoint
Lower left corner of the envelope.
maxPoint
Upper right corner of the envelope.
spatialReference
(Optional) The SpatialReference. The default value is null. If spatialReference is null, then the spatial reference is inherited from minPoint or maxPoint.

Return Value

Exceptions
ExceptionDescription
Indicates the geometry is null or empty.
minPoint or maxPoint is null.
Incompatible spatial references. The spatial references of the MapPoints do not match.
Remarks
The spatial references of the two points must be the same or null.The resulting envelope is normalized to ensure its XMin <= XMax, YMin <= YMax, ZMin <= ZMax, MMin <= MMax and IDMin < IDMax. If any of the xy-coordinate values are NaN, then the envelope is set to empty.
Example
// Use a builder convenience method or use a builder constructor.

MapPoint minPt = MapPointBuilder.CreateMapPoint(1.0, 1.0);
MapPoint maxPt = MapPointBuilder.CreateMapPoint(2.0, 2.0);

// Create an envelope
Envelope env = EnvelopeBuilder.CreateEnvelope(minPt, maxPt);

// Builder convenience methods don't need to run on the MCT.
Polygon polygonFromEnv = PolygonBuilder.CreatePolygon(env);

// Builder constructors need to run on the MCT.
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  using (PolygonBuilder polygonBuilder = new PolygonBuilder(env))
  {
    polygonBuilder.SpatialReference = SpatialReferences.WGS84;
    polygonFromEnv = polygonBuilder.ToGeometry();
  }
});
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

EnvelopeBuilder Class
EnvelopeBuilder Members
Overload List