C#C
C#11mo ago
Jacko

✅ Can custom attributes use interfaces somehow ?

I have an interface named IConfiguration and I'm wondering is it possible to write a custom attribute so I can do [StaticConfiguration("Key"]var settings: Settings so that the StaticConfiguration attribute will get the config for that key from IConfiguration and parse it into the type Settings?
Was this page helpful?