c# - Applying attributes to the Partial classes -
following partial class:
// file - designcontroller.cs [authorize] public partial class designercontroller : apicontroller { // code } [authorize] public partial class designercontroller { // code }
i need understand usage of [authorize] or similar attribute on class, fine have on 1 of partial class definition or of them have it. current code compiling need understand runtime issues of above implementation
on partial classes attributes merged @ compilation time, yes, can have on 1 class.
example:
[obsolete] public partial class foo {} [authorize] public partial class foo {}
compiles to:
[obsolete] [authorize] public partial class foo {}
for further information on can @ msdn: partial classes , methods
Comments
Post a Comment