.net - C# - Alternative way to use attribute -
let got following :
public class { [myattribute] public void test() {} }
i don't behavior of adding attribute prefix method or class []. think make code less readable.
i find better approach can :
addattribute(a, test, myattribute);
is there way of doing ?
because kind of adding attribute @ runtime...
or there other way use attribute ? xml files ?
attributes cannot added @ runtime, embedded in metadata of assembly. can, however, add attributes using external tool during build modifies source code before compiling.
Comments
Post a Comment