ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
var map = ArcGIS.Desktop.Mapping.MapView.Active.Map;
if (map == null)
return;
//Get a particular table template
var tableTemplate = map.FindStandaloneTables("Address Points").FirstOrDefault()?.GetTemplate("Residences");
//Get all the templates of a standalone table
var ownersTableTemplates = map.FindStandaloneTables("Owners").FirstOrDefault()?.GetTemplates();
var statisticsTableTemplates = MapView.Active.Map.GetStandaloneTablesAsFlattenedList().First(l => l.Name.Equals("Trading Statistics")).GetTemplates();
});