Compiler Error CS1900
Warning level must be in the range 0-4
The WarningLevel compiler option can only take one of five possible values (0, 1, 2, 3, or 4). Any other value passed to /warn will result in CS1900.
The following sample generates CS1900:
// CS1900.cs
// compile with: /W:5
// CS1900 expected
class x
{
public static void Main()
{
}
}
Note
The compiler no longer generates this error. Values greater than 4 represent "warning waves" and are valid, even if no warnings are defined for that wave yet.
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for