Skip to content

Instantly share code, notes, and snippets.

@essic
Created March 20, 2018 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save essic/787204924fb4d7a81397993d32782a11 to your computer and use it in GitHub Desktop.
Save essic/787204924fb4d7a81397993d32782a11 to your computer and use it in GitHub Desktop.
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