Hi everybody,
I have write customize attribute TestAttribute
[AttributeUsage( AttributeTarget s.All, Inherited = true)]
public class TestAttribute : Attribute
{
private string name;
public TestAttribute(s tring name)
{
this.name = name;
}
}
[TestAttribute(" Test test")]
public interface TestInterface
{
void function();
}
public class TestClass : TestInterface
{
public void function()...
}
But why TestClass does not inherit TestAttribute from TestInterface ???
Type t = typeof(DerivedC lass);
TestAttribute testAttr = (TestAttribute) Attribute.GetCu stomAttribute(t ,
typeof(TestAttr ibute));
testAttr alway null. Can anybody help me ?
Thanks.
--
Vi