❔ Adding list in single line
In C++, I could add a list in a single line using a vector. For example:
Is there a similar way with C# and lists? That way I'm not calling "Add" 12 times, but keeping them like an array on initialization.
With C#, I think it's just
Or AddRange(): -- Which isn't too bad, but still feels bigger than it should be.
Ideal:
Is there a similar way with C# and lists? That way I'm not calling "Add" 12 times, but keeping them like an array on initialization.
With C#, I think it's just
Or AddRange(): -- Which isn't too bad, but still feels bigger than it should be.
Ideal: