AnsweredAssumed Answered

How to know ArcGis version in C#

Question asked by momobjk on Oct 30, 2012
Latest reply on Oct 30, 2012 by momobjk
Hello,

I have a problem since the last version of ArcGis, the 10.1, was released.

My problem is the following :

When using the DataManagement Clip tool, there's a parameter named nodata_value which was a Double in ArcGis 10 and now it's a string. So when someone uses my program with ArcGis 10.1, he gets this error : System.MissingMethodException: Method not found: 'Void ESRI.ArcGIS.DataManagementTools.Clip.set_nodata_value(Double)'.
ArcGis 10.1 : http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000009n000000
ArcGis 10.0 : http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000009n000000

So a solution may be to check the current version of ArcGis and give the good parameter :
if(arcgis10_1)
   nodata_value = myDoubleValue.ToString();
else
   nodata_value = myDoubleValue;

But I don't know how to recognize in which version I am.

Thank you for your help.

M. Ciftci

Outcomes