Convert to a logger so I can see results in terminal or IDE

This commit is contained in:
2020-12-11 09:36:28 -06:00
parent aa8d9b5fdb
commit 97d7d0141d
12 changed files with 46 additions and 49 deletions

5
Q01.cs
View File

@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
namespace _2020
@ -39,7 +38,7 @@ namespace _2020
{
if (numList[i] + numList[j] == 2020)
{
Debug.WriteLine($"Q01Part1: idx {i} + idx {j} = 2020. mult = {numList[i] * numList[j]}");
Util.Log($"Q01Part1: idx {i} + idx {j} = 2020. mult = {numList[i] * numList[j]}");
return;
}
}
@ -56,7 +55,7 @@ namespace _2020
{
if (numList[i] + numList[j] + numList[k] == 2020)
{
Debug.WriteLine($"Q01Part2: idx {i} + idx {j} + idx {k} = 2020. mult = {numList[i] * numList[j] * numList[k]}");
Util.Log($"Q01Part2: idx {i} + idx {j} + idx {k} = 2020. mult = {numList[i] * numList[j] * numList[k]}");
return;
}
}