Group by using LINQ

as mentioned to you in your other thread

instead of toList we use toArray