|
|
|
|
|
by rkagerer
9 days ago
|
|
I used attributes for a serialization framework (long ago before any good ones existed for C#) and found they were exactly what I needed. The solution was easy to understand and reason about, consistent, even somewhat elegant (and I use that adjective cautiously as I've seen lots of code that was "elegant" but fragile). I agree with your forewarnings, but there are absolutely instances where it's the right tool for the job. |
|
That being said, when I started my current job I replaced some complicated reflection-based code with a dictionary of delegates. I also turbocharged a an ASP (.net 4.x) app's startup time by explicitly referencing each controller in startup code.