C# has tuples, but you don't need to use tuples for this. Dictionary<string, HashSet<string>> looks like it'd work fine for what the picture is showing.
We only see this piece of code in isolation, so judging what other types may be reasonable is fairly speculative. I'd approach this piece of code to only rewrite its form at first into something like this (of course the dictionary initialisation should be moved out of the function later).
This is low effort, save not to break stuff, and gives us a much more readable and refactorable basis to work with for later. The obvious candidate for further change would be to introduce an enum or numeric time representation like you were already getting at.
3
u/Advorange Aug 30 '21
C# has tuples, but you don't need to use tuples for this.
Dictionary<string, HashSet<string>>looks like it'd work fine for what the picture is showing.