0

Is there a rule of thumb or a standard that specifies how to order method arguments?

eg: SaveOrder(DbContext context, Order order) or SaveOrder(Order order, DbContext context)

I have always ordered my inputs such that any items that are required by a method but that are not actually part of the algorithm are provided first (in this case DbContext)

I was wondering if there is a standard or a heuristic that suggests one way is better than the other?

Raj Rao
  • 8,872
  • 12
  • 69
  • 83
  • possible duplicate of [Conventions for order of parameters in a function](http://stackoverflow.com/questions/2796557/conventions-for-order-of-parameters-in-a-function) – Raj Rao Jul 20 '15 at 14:56
  • I found an answer on Programmers.stackexchange.com, which has a more indepth answer than the duplicate on SO [http://programmers.stackexchange.com/questions/101346/what-is-best-practice-on-ordering-parameters-in-a-function](http://programmers.stackexchange.com/questions/101346/what-is-best-practice-on-ordering-parameters-in-a-function) – Raj Rao Jul 20 '15 at 14:57

0 Answers0