Details

    • Type: Language-Specification
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Impact:
      Unknown 'null' severity
    • Likelihood:
      Unknown 'null' severity

      Description

      Noncompliant Code Example

      if(collection.Count >= 0){...}
      
      if(enumerable.Count() < 0){...}
      
      if(array.Length >= 0){...}
      
      bool result = array.Length >=0;
      

      Compliant Solution

      if (list.Any()) { ... }
      
      if (list.Count > 0) { ... }
      
      if (array.Length >= 42) { ... }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            valeri.hristov Valeri Hristov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: