Created
March 20, 2018 10:54
-
-
Save essic/787204924fb4d7a81397993d32782a11 to your computer and use it in GitHub Desktop.
WorriedDarkcyanTransversal created by essic - https://repl.it/@essic/WorriedDarkcyanTransversal
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
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
public enum State { | |
Invalid = 0, | |
Ok = 1, | |
Ignored = 2, | |
NOk = 3, | |
NN = 3 | |
} | |
public class A { | |
public State State ; | |
} | |
class MainClass { | |
public static readonly List<A> Caca = new List<A> (); | |
public static void Main (string[] args) { | |
for( int i = 0; i <= 1000; i++) { | |
//Caca.Add(new A()); | |
} | |
// Caca.Add(new A() {State = State.NN }); | |
var o = Caca.Select(e => (int)e.State) | |
.Cast<int>() | |
.DefaultIfEmpty() | |
.Max(); | |
var s = (State) o; | |
Console.WriteLine ("Hello World : {0}", s); | |
} | |
public State GetStatus(State one, State two) { | |
if ( (int)one < (int)two) | |
{ | |
return two; | |
} else { | |
return one; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment