I'm look at two different ways of setting up my IWorkspaceFactory variable:
A
public static class GIS
{
private static Type factoryType = Type.GetTypeFromProgID("esriDataSourcesRaster.RasterWorkspaceFactory");
public static IWorkspaceFactory RWSF = Activator.CreateInstance(factoryType) as IWorkspaceFactory;
}
B
public static class GIS
{
public static IWorkspaceFactory RWSF = new RasterWorkspaceFactoryClass();
}
Are these still both singleton? If so, is there any difference between these? I've tested it both ways and they appear to do the same thing, but I'm wondering why ESRI recommends A and if I'll run into errors if I've used B.