In extension methods should work for enums #4562
Replies: 2 comments 11 replies
-
Indeed, it seems to be a missing implementation for by in-ref extensions methods for enums. It should be moved to roslyn, or? |
Beta Was this translation helpful? Give feedback.
-
FWIW, while I don't necessarily have a problem with allowing this, there is overhead in passing a value by ref instead of by value, and you're likely to be better-served by just passing the enum by value. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was writing an extension method and I discovered something odd.
Consider the following example:
This shows the following error:

Enums are concrete value types, so I feel this error is incorrect
Beta Was this translation helpful? Give feedback.
All reactions