Relax restrictions to allow T* extension methods to be defined from C# #5367
Replies: 2 comments 2 replies
-
Note that your example is slightly incorrect. Calling methods on pointers either requires What you propose is already possible today using Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
In the admittedly rare occasions this would be used (I'm here because of one), I also find it quite annoying that it's theoretically possible but practically not. |
Beta Was this translation helpful? Give feedback.
-
C# currently supports consuming
T*
extension methods if they are defined in IL, but attempting to define them in C# will result in a compiler error:If you define these in IL, they can be used as expected:
I propose relaxing the restrictions to allow them to be defined in C#.
Beta Was this translation helpful? Give feedback.
All reactions