✅ Can I put an extension method directly on an enum, not a value in the enum?
If I have an enum
can I put an extension method on it so I can use it like this
rather than
And I only want it on that specific enum, not all enums
5 Replies
No, you cannot.
Only way is by static methods.
you could do a enum like class and extend it from that class
@Mark_P i will mark this as closed since it has been answered and you haven't responded in a while, feel free to reopen if you have any further questions