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

Popular posts from this blog

c - CUDA code not processing if block properly -

Android Capture Image From Camera -

oracle11g - get root domain from url Oracle sql regex_substr -