Hello guys,I'm having troubles getting the correspondent IDataset value from a list of IDatasetName objects.Is there an easy way to do it? The simple QI from one another always returns null for me.
public IDataset GetDataset(string targetDatasetName)
{
if (DatasetNames.Count <= 0)
GetDatasetNames();
IDatasetName datasetName = DatasetNames.Find(IsDatasetName(targetDatasetName));
IDataset dataset = datasetName as IDataset; // this always returns null.
if (dataset == null)
throw new DatasetHandlerException(GeodatabaseMessages.DatasetCouldNotBeFound);
return dataset;
}
Ideas?