I have two method overloads:
bool HasRight(RightType rightType, string cityId);
bool HasRight(RightType rightType, string cityAlias);
Of course it won’t compile as methods signatues are the same. What is the best way to solve naming problem in this case?
Would you immediately be able to distinguish between an id and an alias? How about simply:
If it isn’t clear cut, something like “if it starts with
:, for example:nyc, then it is an id, else it is assumed to be an alias”. Other options:suffixed names:
take both and demand exactly one inside the method: