-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Type of issue
Typo
Description
CA1806 emits the following diagnostic for [Pure]
methods:
{0} calls {1} but does not use the value the method returns. Because {1} is marked as a Pure method, it cannot have side effects. Use the result in a conditional statement, assign the result to a variable, or pass it as an argument to another method.
It would also be useful to mention this in the PureAttribute
docs, since it currently says:
This attribute is not enforced by the current analysis tools; you should use this attribute only if you are sure that the methods are pure.
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.contracts.pureattribute
Page URL
https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1806
Content source URL
Document Version Independent Id
59d0b85d-87f3-c4e4-6891-3002e2f60158
Platform Id
a91b8153-7420-d312-601a-b29f874cf8ae
Article author
Metadata
- ID: 0f51f0a0-29e7-be15-ffdc-ee210cf7ef1c
- PlatformId: a91b8153-7420-d312-601a-b29f874cf8ae
- Service: dotnet-fundamentals
Metadata
Metadata
Labels
Type
Projects
Status