C# - Declaration of types within a namespace
问题 what could be a possible use of declaring types within a namespace but not in a class. For ex: namespace Test { public delegate void Ispossible(); } This is valid & does not generate any compilation errors but i can't think of why we would declare it this way as opposed to inside a class. 回答1: A namespace is a high-level unit of organization within .NET. Declaring types within classes is typically frowned upon (but, as with all things, it's not a 100% rule) because it can make the types more