public async Task OpenShapefileFeatureClass()
{
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
FileSystemConnectionPath fileConnection = new FileSystemConnectionPath(new Uri("path\\to\\folder\\containing\\shapefiles"), FileSystemDatastoreType.Shapefile);
using (FileSystemDatastore shapefile = new FileSystemDatastore(fileConnection))
{
FeatureClass taxLotsFeatureClass = shapefile.OpenDataset<FeatureClass>("TaxLots");
FeatureClass manHolesFeatureClass = shapefile.OpenDataset<FeatureClass>("ManHoles.shp"); // Can use the .shp extension, but its not needed.
Table taxDetailsTableWithoutExtension = shapefile.OpenDataset<Table>("TaxDetails");
Table taxDetailsTable = shapefile.OpenDataset<Table>("TaxDetails.dbf");
}
});
}