请教一下关于特性里的问题代码解释
namespace PB_Inherited{
class Program
{
static void Main(string[] args)
{
BaseClass b = new BaseClass();
DerivedClass d = new DerivedClass();
Console.WriteLine("基类中的特性:");
object[] attrs = b.GetType().GetCustomAttributes(true);
foreach (var attr in attrs)
{
Console.WriteLine(attr);
}
}
[AttributeUsage(AttributeTargets.Class,Inherited=true)]
class A1Attribute :System .Attribute { }
class A2Attribute : System.Attribute { }
[A1]
class BaseClass { }
class DerivedClass : BaseClass { }
}
}
object[] attrs = b.GetType().GetCustomAttributes(true);这句话什么意思????????????????