C # has a lot of unicorn stuff hidden away, but many developers don’t know it, so they can’t make good use of these things. So today I will count the details hidden in the compiler. Not only Task and ValueTask can await When writing asynchronous code...

Markdown supported · ⌘↵ to post
David Cuccia
Let's learn new things and use them
It's one of the places the compiler uses duck-typing...no interface needed. Would be great to have this type of shape-based coding pattern more available to the developer, sometimes called "structural typing." The father of C#, Anders Hejlsberg, said that the benefits of structural typing was a big take-away for him when he subsequently designed Typescript.