Chapter 3 Quick Reference


Chapter 3 Quick Reference

To

Do this

Declare a method

Write the method inside a class. For example:

int addValues(int leftHandSide, int rightHandSide) {   ... }

Return a value from inside a method

Write a return statement inside the method. For example:

return leftHandSide + rightHandSide;

Return from a method before the end of the method

Write a return statement inside the method. For example:

return;

Call a method

Write the name of the method, together with any arguments between parentheses. For example:

addValues(39, 3);

Use the Generate Method Stub Wizard

Highlight a call to the method, and then click Generate Method Stub on the IntelliSense menu.

Display the Debug toolbar

On the View menu, point to Toolbars, and then click Debug.

Step into a method

On the Debug toolbar, click Step Into.

or

On the Debug menu, click Step Into.

Step out of a method

On the Debug toolbar, click Step Out.

or

On the Debug menu, click Step Out.




Microsoft Visual C# 2005 Step by Step
Microsoft® Visual C#® 2005 Step by Step (Step By Step (Microsoft))
ISBN: B002CKYPPM
EAN: N/A
Year: 2005
Pages: 183
Authors: John Sharp

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net