I have a class Robot, which should contain method Move(...). Robot is an instance class, you can have more robots working. I thought about making Move static method, because all robots use same logic when moving somewhere.
Robots contains information about their position, therefore I need to pass instance of Robot to Move method. There is also parameter Direction, which is enum (West, East, ...).
What is better and why?
public static Move(ref Robot rob, Direction dir) { rob.Position = ... } or
public Move(Direction dir) { this.Positon = ... } Is there any performance or memory difference?