-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
I'm trying to find the formal documentation for:
#pragma warning disable format
#pragma warning restore format
1) I haven't been able to find this pragma at Microsoft Learn (it does work for me in VS 2022); I'm guessing either it is not indexed or not present. It seems there is an expectation that the (MS Learn) user will have warning numbers, as indicated by the "filter by title" heading and this highlighted note on this web page:
To find warning numbers in Visual Studio, build your project and then look for the warning numbers in the Output window.
However, 2) this pragma does not generate warnings, therefore, if it is indexed by "warning number", then I have no way of looking it up.
You may take this feedback to be a combination of "make sure this pragma is documented" and "make sure that this pragma, and others that do not relate to Visual Studio warning numbers, can be found at MS Learn."
Perhaps the highlighted note should be edited to note that not all pragmas are associated with Visual Studio warnings.
Thank you!
P.S. Implied in the fact that I am posting this feedback, I consider this an important #pragma and I'd like to be able to encourage the use of this #pragma and continued support by Microsoft by referencing said documentation.
[Enter feedback here]
Document Details
โ Do not edit this section. It is required for learn.microsoft.com โ GitHub issue linking.
- ID: 716913e5-dbbe-bdb0-909a-4d8c2dc7be97
- Version Independent ID: 501be68d-5ad0-18d9-8958-54215bb57fc0
- Content: C# preprocessor directives
- Content Source: docs/csharp/language-reference/preprocessor-directives.md
- Product: dotnet-csharp
- Technology: csharp-language-reference
- GitHub Login: @BillWagner
- Microsoft Alias: wiwagn