© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•13mo ago•
12 replies
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?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Use Custom Attributes with ASP.NET Identity
C#CC# / help
2y ago
Interfaces
C#CC# / help
3y ago
✅ When to use interfaces and why
C#CC# / help
11mo ago
✅ Apply multiple attributes from custom attribute
C#CC# / help
2y ago