Ad
  • Custom User Avatar

    Thanks for explaining your choices :)

  • Custom User Avatar

    if (items == null || items.Length == 0) C# compiler makes check on null them self, so if (items.Length == 0) is enought.
    max = items[i].CompareTo(max) > 0 ? items[i] : max; is slower then if (max.CompareTo(items[i]) < 0) max = items[i];

    I love var more then T because code can be copied and paste to another place without changing.