65.9K
CodeProject is changing. Read more.
Home

Get CustomAttributes the easy way....

starIconstarIconstarIconemptyStarIconemptyStarIcon

3.00/5 (1 vote)

Apr 15, 2010

CPOL
viewsIcon

3845

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.

How about typing the 'this' parameter as ICustomAttributeProvider ? Also, ToList(...).Where(...) is bad Linq usage, because ToList() triggers enumeration of the sequence. Try Where(...).ToList() instead. And the ToList() in 'ToList().FirstOrDefault(...)' is entirely pointless.