Compiler Warning (level 1) CS1691
'number' is not a valid warning number
A number that was passed to the #pragma warning preprocessor directive was not a valid warning number. Verify that the number represents a warning, not an error or another sequence of characters.
Example
The following example generates CS1691.
// CS1691.cs
public class C
{
int i = 1;
public static void Main()
{
C myC = new C();
#pragma warning disable 151 // CS1691
// Try the following line instead:
// #pragma warning disable 1645
myC.i++;
#pragma warning restore 151 // CS1691
// Try the following line instead:
// #pragma warning restore 1645
}
}
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