Skip to content

Instantly share code, notes, and snippets.

@rpgmaker
Created July 31, 2012 15:22
Show Gist options
  • Save rpgmaker/3217778 to your computer and use it in GitHub Desktop.
Save rpgmaker/3217778 to your computer and use it in GitHub Desktop.
Test Similar Loops
static void DoSomething() {
while (true) {
var id = _rand.Next();
if (id == 0) break;
if (id > 1) {
id += 1;
Console.Write(id);
break;
}
}
}
static void DoSomething2() {
while (true) {
var id = _rand.Next();
if (id > 1 || id == 0) {
if (id > 1) {
id += 1;
Console.Write(id);
}
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment