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

ArcGIS.Core.Geometry Namespace > EnvelopeBuilder Class > CreateEnvelope Method : CreateEnvelope(Double,Double,Double,Double,SpatialReference) Method
Lower left corner x value of the envelope.
Upper right corner y value of the envelope.
Lower left corner x value of the envelope.
Upper right corner y value of the envelope.
(Optional) The SpatialReference. The default value is null.
Convenience method to create a new instance of the Envelope class.
Syntax
Public Overloads Shared Function CreateEnvelope( _
   ByVal xMin As Double, _
   ByVal yMin As Double, _
   ByVal xMax As Double, _
   ByVal yMax As Double, _
   Optional ByVal spatialReference As SpatialReference _
) As Envelope

Parameters

xMin
Lower left corner x value of the envelope.
yMin
Upper right corner y value of the envelope.
xMax
Lower left corner x value of the envelope.
yMax
Upper right corner y value of the envelope.
spatialReference
(Optional) The SpatialReference. The default value is null.

Return Value

Remarks
The resulting envelope is normalized to ensure its XMin <= XMax, YMin <= YMax. If any of the xy-coordinate values are NaN, then the envelope is set to empty.
Example
// use the convenience builders - don't need to run on the MCT.
Envelope env1 = EnvelopeBuilder.CreateEnvelope(0, 0, 1, 1, SpatialReferences.WGS84);
Envelope env2 = EnvelopeBuilder.CreateEnvelope(0.5, 0.5, 1.5, 1.5, SpatialReferences.WGS84);

Envelope env3 = env1.Union(env2);

double area = env3.Area;
double depth = env3.Depth;
double height = env3.Height;
double width = env3.Width;
double len = env3.Length;

MapPoint centerPt = env3.Center;
Coordinate2D coord = env3.CenterCoordinate;

bool isEmpty = env3.IsEmpty;
int pointCount = env3.PointCount;

// coordinates
//env3.XMin, env3.XMax, env3.YMin, env3.YMax
//env3.ZMin, env3.ZMax, env3.MMin, env3.MMax

bool isEqual = env1.IsEqual(env2);    // false


// or use the builder constructor - need to run on the MCT.
using (var builder = new EnvelopeBuilder(0, 0, 1, 1, SpatialReferences.WGS84))
{
  env3 = builder.Union(env2);     // builder is updated to the result
  depth = builder.Depth;
  height = builder.Height;
  width = builder.Width;

  centerPt = builder.Center;
  coord = builder.CenterCoordinate;

  isEmpty = builder.IsEmpty;
}


// or use the builderEx constructors = don't need to run on the MCT.
EnvelopeBuilderEx builderEx = new EnvelopeBuilderEx(0, 0, 1, 1, SpatialReferences.WGS84);
builderEx.Union(env2);      // builder is updated to the result

depth = builderEx.Depth;
height = builderEx.Height;
width = builderEx.Width;

centerPt = builderEx.Center;
coord = builderEx.CenterCoordinate;

isEmpty = builderEx.IsEmpty;

env3 = builderEx.ToGeometry() as Envelope;
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

EnvelopeBuilder Class
EnvelopeBuilder Members
Overload List