C# C# Streams and Data Processing Parsing Data Working with Enums

Christian Higgins
Christian Higgins
15,622 Points

Why do you remove the brackets when you replace string[] with GameResult?

Wouldn't GameResult also be an array?

1 Answer

Steven Parker
Steven Parker
172,268 Points

GameResult is a class that has a separate property for each statistic, so one object of that class is a suitable replacement for an entire array of strings with each statistic in one string.

Christian Higgins
Christian Higgins
15,622 Points

Aaah, ok, got it. It isn't just an array of strings, it's gameResult.GameDate, gameResult.HomeOrAway, etc.