System.Web.PreApplicationStartMethodAttribute is defined as:
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple=true)] public sealed class PreApplicationStartMethodAttribute : Attribute {}
those. it is reusable (AllowMultiple = true). But if I try to add several attributes of this attribute to my assembly:
[assembly: PreApplicationStartMethod(typeof(MyType1), "Start")] [assembly: PreApplicationStartMethod(typeof(MyType2), "Start")]
I get a compiler error:
Error 2 Duplicate Attribute "PreApplicationStartMethod"
Why is this?
Shrike
source share