I want to add an existing feature class to an existing feature dataset. Both the feature class and the dataset have the same coordinate system, I searched over the net but only assistance I found was to create a new feature class in a feature dataset (I tried that and it worked). According my understanding I tried using IDatasetContainer
but it's not working. Here is the code:
IFeatureDataset featureDataset1 = featureWorkspace.OpenFeatureDataset("featureDataset1");
IDataset datasetFcTenActors = fc_tenActors as IDataset; // fc_tenActors is my feature class to add
IDatasetContainer container = featureDataset1 as IDatasetContainer;
container.AddDataset(datasetFcTenActors);