Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WorriedDarkcyanTransversal created by essic - https://repl.it/@essic/WorriedDarkcyanTransversal
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
You can’t perform that action at this time.