QA


Q&A

Q.

Should I always try to place code into instance classes rather than static classes?

A.

Not necessarily. As with most things, there are no hard and fast rules. Correctly programming instance classes takes some skill and experience, and programming static is easier for the beginner. If you want to experiment with instance classes, I encourage you to do so. However, don't feel as though you have to place everything into instantiated classes.

Q.

I want to create a general class with a lot of miscellaneous methodssort of a "catchall" class. What's the best way to do this?

A.

If you want to create some sort of utility class, I recommend calling the class something like clsUtility. Then you can use this class throughout your application to access the utility functions.




Sams Teach Yourself Microsoft Visual C# 2005 in 24 Hours, Complete Starter Kit
Sams Teach Yourself Visual C# 2005 in 24 Hours, Complete Starter Kit
ISBN: 0672327406
EAN: 2147483647
Year: N/A
Pages: 248
Authors: James Foxall

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