Skip to content

Instantly share code, notes, and snippets.

@toburger
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toburger/6114a036f36bee3f347d to your computer and use it in GitHub Desktop.
Save toburger/6114a036f36bee3f347d to your computer and use it in GitHub Desktop.
void Main()
{
var result =
from g in AllGames()
let _ = Sort(g.Goals)
select new { Team1 = g.Team1, Team2 = g.Team2, Goals = g.Goals };
result.Dump();
}
// Define other methods and classes here
int Sort(tGoal[] goals) {
var gs = goals.OrderBy(g => g.iMinute).ToArray();
for(var i = 0; i < gs.Length; i++)
goals.SetValue(gs[i], i);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment