Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 426 Bytes

MA0068.md

File metadata and controls

12 lines (10 loc) · 426 Bytes

MA0068 - Invalid parameter name for nullable attribute

class Test
{
    [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute("unknown")] // non-compliant, "unknown" is not a parameter of the method
    public void A(string a) { }

    [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute("a")] // compliant, "a" is not a parameter of the method
    public void A(string a) { }
}