The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,262 other subscribers

Please do not make your C# code an obfuscation contest

Posted by jpluimers on 2024/04/23

You. This is valid C# code. Guess what it does [Wayback/Archive]:

for (
  var (f,l) = (1, 10);
  f <= 10;
  Console.WriteLine($"{f} + {l} = {f + l}"),
  f++,
  l--
);

Via [Wayback/Archive] Khalid πŸ•β€πŸ¦ΊπŸ•πŸ© on Twitter: “I’m trying some programming in #csharp today. Am I doing this right? #dotnet”

–jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.