more concise ReadInts()
This commit is contained in:
parent
4071a75516
commit
d4f34eb07c
@ -14,7 +14,7 @@ namespace AdventOfCode {
|
|||||||
|
|
||||||
static List<int> ReadInts(string filename) {
|
static List<int> ReadInts(string filename) {
|
||||||
string[] lines = File.ReadAllLines(filename);
|
string[] lines = File.ReadAllLines(filename);
|
||||||
return lines.Select(s => int.Parse(s)).ToList();
|
return lines.Select(int.Parse).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Day1Part1(List<int> numbers) {
|
static int Day1Part1(List<int> numbers) {
|
||||||
|
Loading…
Reference in New Issue
Block a user