Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Keyword 'new' is not allowed on elements defined in a namespace
It is not necessary to specify the new keyword on any construct that is in a namespace.
The following sample generates CS1530:
// CS1530.cs
namespace a
{
new class i // CS1530
{
}
// try the following instead
class ii
{
public static void Main()
{
}
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.