Skip to content

Instantly share code, notes, and snippets.

@Korporal
Korporal / gist:7b21244cfb8d29c6335ff0ab567e4928
Last active September 17, 2021 14:47
Generics challenge
namespace HolidayAPI
{
public class Schedule<T> where T : ISchedulable<IComparable>
{
private List<T> values = new List<T>();
public void AddEvent(in T Event)
{
values.Add(Event);
values = values.OrderBy(r => r).ToList();