Input code
If Not String.IsNullOrWhiteSpace(Var1) AndAlso Not (Var1?.StartsWith("{"c) AndAlso Var1?.EndsWith("}"c)) Then
' ...
End If
If Not String.IsNullOrWhiteSpace(Var2) AndAlso Not Var2?.StartsWith(">") Then
' ...
End If
Erroneous output
error CS0019: Operator '&&' cannot be applied to operands of type 'bool?' and 'bool?'
error CS0019: Operator '&&' cannot be applied to operands of type 'bool' and 'bool?
if ((!string.IsNullOrWhiteSpace(Var1) && !((Var1?.StartsWith(Conversions.ToString('{'))) && (Var1?.EndsWith(Conversions.ToString('}'))))) == true)
{
//...
}
if ((!string.IsNullOrWhiteSpace(Var2) && !(Var2?.StartsWith(">"))) == true)
{
//...
}
Expected output
if (!string.IsNullOrWhiteSpace(Var1) && !(Var1?.StartsWith("{") ?? false) && (Var1?.EndsWith("}") ?? false))
{
//...
}
if (!string.IsNullOrWhiteSpace(Var2) && !(Var2?.StartsWith(">") ?? false))
{
//...
}
Details
- Product in use: VS extension

Input code
Erroneous output
Expected output
Details