Aracılığıyla paylaş


How to: Reorder Parameters (Class Designer C# only)

In the Class Designer, you can change the order of method parameters in types.

Not

Optional parameters must be the last parameters in the parameter list. For information on creating optional parameters using Class Designer, see How to: Add Parameters to a Method (Class Designer)

To change the order of parameters

  1. On the class diagram, expand the type shape and then the Methods compartment.

  2. In the Methods compartment, right-click the method with the parameters you want to reorder, point to Refactor, and choose Reorder Parameters.

    The Reorder Parameters dialog box appears.

  3. In the Reorder Parameters dialog box, move the parameters into the order you want, and click OK.

    The parameter order changes in code and in the shape on the class diagram.

See Also

Other Resources

Refactoring Classes and Types (Class Designer)