Get CustomAttributes the easy way....
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.