Created
December 16, 2013 14:30
-
-
Save kawakawa/7987818 to your computer and use it in GitHub Desktop.
Linqでランダムに値を集める方法
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
int seed = Environment.TickCount; | |
var rand = new Random(seed); | |
int toSkip = rand.Next(0, this.targetList.Count - 1); | |
var status = this.targetList | |
.Skip(toSkip) | |
.Take(1) | |
.FirstOrDefault(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment