Summary

   

In this hour , you learned how a method is a discrete set of code designed to perform a task or related set of tasks . Methods are where you write C# code. Some methods may be as short as a single line of code, whereas others are pages in length. You learned how to define methods and how to call them. Creating and calling methods is critical to your success in programming with C#; be sure to avoid creating recursive methods! Because you use methods so often, they'll become second nature to you in no time.

Classes are used to group methods. In this hour, I focused on the class module (which is little more than a container for methods) and static methods. Remember to group related methods in the same class and to give each class a descriptive name . In Hour 17, you'll build on your experience with classes and methods and work with instance classes.

Finally, you learned about Visual Studio's new Task List feature. You now know that C# creates some tasks for you but that you are free to create tasks as you see fit. You learned how to easily jump to a statement that's related to a task and how to create tasks that aren't related to a specific code statement. The Task List is a powerful tool to have in your arsenal, and I encourage you to use it.


   
Top


Sams Teach Yourself C# in 24 Hours
Sams Teach Yourself Visual Basic 2010 in 24 Hours Complete Starter Kit (Sams Teach Yourself -- Hours)
ISBN: 0672331136
EAN: 2147483647
Year: 2002
Pages: 253
Authors: James Foxall

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