Is there a way to convert this if/else statement so that it can be called in a more dynamic way without using reflection?
if (left.IsColliding()) directions.Remove(Direction.Left);
else directions.Add(Direction.Left);
In JavaScript I can do the following and I was wondering if there was something similar in C#.
directions[left.IsColliding() ? "Remove" : "Add"](Direction.Left);