aoc2017/csharp/BScottProgram.cs

30 lines
973 B
C#
Raw Permalink Normal View History

2018-12-22 12:50:18 -06:00
using System;
using System.Reflection;
namespace AOC2017
{
class BScottProgram
{
static void Main(string[] args)
{
// Find all classes inheriting from BScottSolution, create an instance, and execute Run method.
foreach (Type t in Assembly.GetAssembly(typeof(BScottSolution)).GetTypes())
{
if (t.IsSubclassOf(typeof(BScottSolution)))
{
BScottSolution solution = Activator.CreateInstance(t) as BScottSolution;
Console.WriteLine("-----------------------------------------------------------");
Console.WriteLine(solution.Name);
Console.WriteLine("-----------------------------------------------------------");
solution.Run();
Console.WriteLine();
}
}
Console.ReadLine();
}
}
}