I have something that looks like the following:
[CoolnessFactor]
interface IThing {}
class Tester
{
static void TestSomeInterfaceStuff<T>()
{
var attributes = from attribute
in typeof(T).GetCustomAttributes(typeof(T), true)
where attributes == typeof(CoolnessFactorAttribute)
select attribute;
//do some stuff here
}
}
and then I would call it like so:
TestSomeInterfaceStuff<IThing>();
However, when I do this, it doesn't return any attributes at all.
Thoughts?