Get CustomAttributes the easy way.... [Tip/Trick]
Posted: 15 Apr 2010
Updated: 15 Apr 2010
Rating: 3.00/5
Votes: 1
Popularity: 0.00
Licence: The Code Project Open License (CPOL)
Bookmarked: 0
Downloaded: 0
How about typing the 'this' parameter as ICustomAttributeProvider ?Also, ToList(...).Where(...) is bad Linq usage, becauseToList() triggers enumeration of the sequence. Try Where(...).ToList() instead.And the ToList() in 'ToList().FirstOrDefault(...)' is entirely pointless.