Added: C# Language Design Notes for May 31, 2017 #691
Replies: 5 comments
-
I think we can safe to allow constraint interface only with void A<T>(ref this T data) where T : struct,InterfaceA,InterfaceB,InterfaceC
{
DoSomethingT;
} |
Beta Was this translation helpful? Give feedback.
-
Regarding the weird syntax like Isn't And why has been chosen for the syntax |
Beta Was this translation helpful? Give feedback.
-
I was just thinking the same thing. Also, maybe it's in the other proposals, but what is the result of |
Beta Was this translation helpful? Give feedback.
-
Of course it's not idiomatic in the current version of C#. It's doing something that's not possible in the current version of the language, so it pretty much can't use existing syntax.
It does. |
Beta Was this translation helpful? Give feedback.
-
Using a cast (although, just syntactically) doesn't make sense, because virtual dispatch doesn't care about static type of an expression, same goes with casting |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
C# Language Design Notes for May 31, 2017
Please discuss.
Beta Was this translation helpful? Give feedback.
All reactions