Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3383 C# Coding Style Guidelines
  3. AVRO-3497

Fix IDE0075 Simplify conditional expression

    XMLWordPrintableJSON

Details

    Description

      // dotnet_style_prefer_simplified_boolean_expressions = true
      var result1 = M1() && M2();
      var result2 = M1() || M2();
      
      // dotnet_style_prefer_simplified_boolean_expressions = false
      var result1 = M1() && M2() ? true : false;
      var result2 = M1() ? true : M2(); 

      Attachments

        Activity

          People

            KSchoonover Kyle Schoonover
            KSchoonover Kyle Schoonover
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 50m
                2h 50m