static void Main(string[] args)
{
//ESRI License Initializer generated code.
m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeStandard, esriLicenseProductCode.esriLicenseProductCodeAdvanced },
new esriLicenseExtensionCode[] { });
var geom1 = "LINESTRING (2 1, 7 1)".ToGeometry();
var geom2 = "LINESTRING (3 1, 6 1)".ToGeometry();
var targetOperator = (ITopologicalOperator)geom1;
targetOperator.Simplify();
IGeometry intersectGeometry = targetOperator.Intersect(geom2, esriGeometryDimension.esriGeometryNoDimension );
Console.WriteLine(intersectGeometry.ToWellKnownText());
m_AOLicenseInitializer.ShutdownApplication();
}
In Java, I would have to put some of that in a try-catch block. Does .NET not have AutomationExceptions?
My question is why I cannot do intersection of two polylines to produce a polyline in 10.1
I believe this is a special case. Both input lines are horizontal and overlapping with each other. This can causes the crash as you mentioned. The problem has already been addressed in 10.2.