SpatialReference sr = SpatialReferences.WGS84;
Coordinate2D[] coords = new Coordinate2D[] { new Coordinate2D(5, 10), new Coordinate2D(15, 20), new Coordinate2D(25, 10), new Coordinate2D(5, 20) };
Polyline polyline = PolylineBuilderEx.CreatePolyline(coords, sr);
NonSimpleReason nonSimpleReason;
bool isSimple = GeometryEngine.Instance.GetNonSimpleReason(polyline, out nonSimpleReason);
// isSimple = true;
// nonSimpleReason = NonSimpleReason.IsSimple
double resolution = sr.XYResolution;
coords = new Coordinate2D[] { new Coordinate2D(0, 0), new Coordinate2D(0, 1.8 * resolution), new Coordinate2D(10, 10), new Coordinate2D(0, 5) };
polyline = PolylineBuilderEx.CreatePolyline(coords, sr);
isSimple = GeometryEngine.Instance.GetNonSimpleReason(polyline, out nonSimpleReason);
// isSimple = false
// nonSimpleReason = NonSimpleReason.ShortSegments
coords = new Coordinate2D[] { new Coordinate2D(10, 10), new Coordinate2D(10, 20), new Coordinate2D(40, 20),
new Coordinate2D(40, 10), new Coordinate2D(60, 10), new Coordinate2D(70, 10)};
Polygon polygon = PolygonBuilderEx.CreatePolygon(coords, sr);
isSimple = GeometryEngine.Instance.GetNonSimpleReason(polygon, out nonSimpleReason);
//isSimple = false
//nonSimpleReason = NonSimpleReason.SelfIntersections