System.Web.PreApplicationStartMethodAttribute defined as:
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple=true)]
public sealed class PreApplicationStartMethodAttribute : Attribute
{}
I.e. it allows multiple usage (AllowMultiple=true). But if I try to added several usages of this attribute to my assembly :
[assembly: PreApplicationStartMethod(typeof(MyType1), "Start")]
[assembly: PreApplicationStartMethod(typeof(MyType2), "Start")]
I get compiler error:
Error 2 Duplicate 'PreApplicationStartMethod' attribute
Why is this?