QA


Q&A

Q.

Do I need to pay much attention to scope when defining my procedures?

A.

It might be tempting to create all your methods as public, but this is bad coding practice for a number of reasons. For one thing, you'll find that in larger projects, you have methods with the same name that do slightly different things. Usually, these routines are relevant only within a limited scope. However, if you create all public methods, you'll run into conflicts when you create a method with the same name in the same scope. If the method isn't needed at the public level, don't define it for public access.

Q.

What is a "reasonable" number of classes?

A.

This is hard to say. There really is no right answer. Instead of worrying about an exact count, you should strive to make sure that your classes are logical and that they contain only appropriate methods and properties.




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