# C# Warnings and Errors For F# see [[FSharp Warnings and Errors|F# Warnings and Errors]]. ## Error and Warning Codes - 0114 – hiding base implementation in child class - 0162 – unreachable code (early returns) - 0219 – a variable is assigned but its value is never used - 1701 – reference version mismatch. A [[Binding Redirects|binding redirect]] is needed, or this error needs to be suppressed. ## Promoting Warnings into Errors You can promote warnings into errors using the `WarningsAsErrors` property ```xml <PropertyGroup> <WarningsAsErrors>;NU1605; 0114</WarningsAsErrors> </PropertyGroup> ``` ## Disabling (suppressing) Warnings Done with the `#pragma` directive locally in a file: ```csharp #pragma warning disable 0649 #pragma warning restore 0649 ``` Or, using a csproj property in the project or the Directory.Build.props file. ```xml <PropertyGroup> <NoWarn>1701;1702;0114</NoWarn> </PropertyGroup> ```