jvickrey79

Can I use Activator.CreateInstance when declaring a new Geoprocessor object??

Discussion created by jvickrey79 on Jun 16, 2010
Latest reply on Jun 25, 2010 by jvickrey79
I've used the below lines of code to start creating a new geodatabase but I need to do something similar for declaring a new Geoprocessor object.  I keep getting an error in my C# code right at Geoprocessor gp = new Geoprocessor.  I'm guessing this is because of the new keyword so I'm hoping I can use something similar to below code

Type t = Type.GetTypeFromProgID("esriDataSourcesGDB.AccessWorkspaceFactory.1");//("{DD48C96A-D92A-11D1-AA81-00C04FA33A15}");
                    System.Object obj = Activator.CreateInstance(t);

Outcomes