Last active
August 29, 2015 14:02
-
-
Save toburger/6114a036f36bee3f347d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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