Hello,
Liberally sprinkled through the code snippets provided in the ArcGIS Pro SDK there are several references to using:
.FirstOrDefault
Any idea on how to get it to work?
I'm attempting the following:
MapProjectItem mpi = Project.Current.GetItems<MapProjectItem>().FirstOrDefault(m => m.Name.Equals(strMapName, StringComparison.CurrentCultureIgnoreCase));
I'm using the above to retrieve the first occurrence of a map element in a project with the given name in an array that meets the search criteria. However, the above method is not part of the GetItems class. As a result Visual Studio returns "IEnumeratable<MapProjectItem> does not contain a definition for .FirstOrDefault and no accessible extension accepting a first argument could be found."