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 1,860 other subscribers

Posts Tagged ‘36566’

File scoped namespaces – C# 10.0 draft specifications | Microsoft Learn

Posted by jpluimers on 2025/05/01

Oops, I thought this had been published a long time ago, but oh well: it is never too late to publish reflections on a C# programming language improvement.

After recovering from my rectum cancer treatments and finally upgrading most of my projects to recent enough C# versions, it was time to catch up on useful little C# language features released during my treatments.

This one is really nice: [Wayback/Archive] File scoped namespaces – C# 10.0 draft specifications | Microsoft Learn.

I wish it had been released much earlier, as it so much reminds me of the unit keyword in Delphi which influenced C# a lot. Well, actually the unit actually started in UCSD Pascal and Turbo Pascal; UCSD Pascal ran on the UCSD p-Machine (more on that in a future blog post), which influenced the Java Virtual Machine, which was based on Java bytecode and a Just-in-time compiler in turn influenced the .NET Common Language Runtime.

There are many examples from other languages, paradigms and frameworks: I love how C# and .NET bring so much programming history together.

In Delphi  it is easy: a source file can contain at maximum one unit (and apart from files included in that source file, no other source files can contribute to that unit) and the filename needs to match the unitname, so the unit is a self contained namespace.

Read the rest of this entry »

Posted in .NET, About, C#, C# 10, Cancer, Delphi, Development, Java, Java Platform, Jon Skeet, Pascal, Personal, Rectum cancer, Rider from JetBrains, Software Development, Turbo Pascal, UCSD Pascal, Visual Studio and tools, vscode Visual Studio Code | Tagged: , , , , , | Leave a Comment »