Click here to Skip to main content
15,881,807 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

Get CustomAttributes the easy way....

Rate me:
Please Sign up or sign in to vote.
3.00/5 (1 vote)
15 Apr 2010CPOL 3.8K   1  
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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --