wackoisgod
10/6/2018 - 1:18 PM

wtf.cs

using System;
using System.Collections.Generic;
using System.Linq;

public class Thing {
    public DateTime start;
    public DateTime end;
    
   	public string theme;
}
public class C {
    List<Thing> c = new List<Thing>();
    
    public string M(DateTime date) {
        foreach (var s in c) {
                if (s.start >= date && s.end < date) return s.theme;
            }
        
        return null;
    }
    
     public string T(DateTime date) {
        return (from s in c where s.start >= date && s.end < date select s.theme).FirstOrDefault();
    }
}