Click here to Skip to main content
Click here to Skip to main content
Alternative Tip/Trick

Tagged as

Get CustomAttributes the easy way....

, 15 Apr 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

tonyt

United States United States
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150326.1 | Last Updated 15 Apr 2010
Article Copyright 2010 by tonyt
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid