kaspatoo

TouchCut throws NullreferenceException C#

Discussion created by kaspatoo on Aug 1, 2011
Latest reply on Aug 3, 2011 by dubravko.antonic-gdi-net-esridist
Hallo,

I am going to call the following code:
IGeometry left = new LineClass();
IGeometry right = new LineClass();
(featureClass as IPolyline3).TouchCut((contourClass as IPolyline), out left, out right);


When calling the method touchCut I'll get a NullreferenceException, but dont know what for.
The passed parameters are not null.
The object contourClass is a polyline successfully loaded from a FGDB.

The spatial reference of left and right are null, within them.
In contourClass are AreaField, EXTCLSID, Extension, ExtensonProperties and FeatureDataset null.

One thing which made me confused is the documentation of touchCut:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m000002p4000000

There left and right have to be passed by ref. But Visual Studio is forcing me to pass by out.

Thanks for any help.

Outcomes