Use operator (==, !=, >, >=, <, <=, +, -, *, / ......) for generic-typed variable in a generic type #3291
-
This issue has been moved from a ticket on Developer Community. I have a code snippet where I want to use operator == for the variable of type "T where T: struct, Enum". Also I have benchmarked the performance over using and not using operator == for the generic case and the non-generic case. using System; using System.Diagnostics; Image:112849-benchmark-result.png Original CommentsVisual Studio Feedback System on 1/8/2020, 11:41 PM:Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Thank for listening to me ! |
Beta Was this translation helpful? Give feedback.
-
Hey @HyVong007 Can you move this to |
Beta Was this translation helpful? Give feedback.
-
@HyVong007 FYI: |
Beta Was this translation helpful? Give feedback.
-
Sad to hear it's not possible now. May be 10 years later it will be possible ! |
Beta Was this translation helpful? Give feedback.
-
This is being considered for C# 10.0 as part of #110. |
Beta Was this translation helpful? Give feedback.
This is being considered for C# 10.0 as part of #110.