Examples of errors detected by the V3078 diagnostic


V3078. Original sorting order will be lost after repetitive call to 'OrderBy' method. Use 'ThenBy' method to preserve the original sorting.


SharpDevelop

V3078 Original sorting order will be lost after repetitive call to 'OrderBy' method. Use 'ThenBy' method to preserve the original sorting. CodeCoverageMethodElement.cs 124


void Init()
{
  ....
  this.SequencePoints.OrderBy(item => item.Line)
                     .OrderBy(item => item.Column);
}

Telerik UI for UWP

V3078 Original sorting order will be lost after repetitive call to 'OrderBy' method. Use 'ThenBy' method to preserve the original sorting. GridModel.Selection.cs 107


private void BuildCellSelectionRegions(....)
{
  ....
  this.MergeCellSelectionRegions(selectedItemsInView
      .OrderBy(c => c.Column.ItemInfo.LayoutInfo.Line)
      .OrderBy(c => c.RowItemInfo.LayoutInfo.Line));
}


Bugs Found

Checked Projects
364
Collected Errors
13 504