Steven Giesel 10/15/2022

Cursed C# - Doing shenanigans in C#

Read Original

This technical blog post demonstrates how to use C# extension methods to implement seemingly nonsensical patterns, such as iterating over an integer's digits with a foreach loop and directly awaiting a TimeSpan object. It explains the underlying compiler patterns and duck-typing that make these 'cursed' shenanigans possible.

Cursed C# - Doing shenanigans in C#

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes