i am not very familiar with linq syntax, and i am not sure if this query is the perfect fit of what i am trying to achieve but its working perfectly. how can i make it better and is it possible avoiding the use of a new tuple or a new object?
byte[] ShuffledBytes= new byte[20];
byte[] Indecies = new byte[20]; //holds the right index for each byte in Bytes
var orderdBytes =
Indecies.
Zip(ShuffledBytes, (i, b) => new Tuple<byte,byte>(b,i)).
OrderBy(o => o.Item2).
Select(o => o.Item1).
ToArray();