using System.Xml.Serialization;
using System.Collections;
using System.Collections.Generic;
public static void Main()
List<Test> tests = new List<Test>()
int[] newOrder = new int[7] { 201, 401, 300, 101, 601, 500, 777 };
var results = from a in tests.Select((r, i) => new {item = r, Index = i})
from b in newOrder.Select((r, i) => new { item = r, Index = i }).Where(b => a.item.No == b.item).DefaultIfEmpty()
orderby (b == null ? tests.Count() + a.Index : b.Index)
Console.WriteLine("Records:" + results.Count());
foreach (var item in results)
Console.WriteLine(string.Join(",", item.No));
public int No { get; set; }