You can load a value from some configuration file or database using an approach similar to How to set a dynamic value in my attribute by passing class and property names, for example.
[IsBrowsable ("file_name", "file_name")]
However, it will be unpleasant to enter line names that are obvious and somehow need to be able to determine from reflection. You can try using IL Weaver tools like PostSharp or Fody. (I believe that they are able to make such thoughts, but now they have no example) β
Michael freidgeim
source share