With C# 10 and .NET 6 you can now use file scoped namespaces. With this feature you can apply your namespace to the entire file no matter how many classes are inside. It is a feature that removes a redundant level of nesting and can make your code more appealing/easier to read. Let’s see an example of how to use them:
namespace TempleOs.Classes;
public class Temple
{
}
Leave a comment