private static string getStringVal(object value)
{
if (value is bool boolVal)
return boolVal ? "1" : "0";
return null;
}
SonarCloud will flag return boolVal ? "1" : "0";
with:
Bug: Change this condition so that it does not always evaluate to 'true'; some subsequent code is never executed.