August 2003
Beginner
600 pages
12h 55m
English
| Q1: | Do I need to pay much attention to scope when defining my methods? |
| A1: | It may be tempting to create all your methods as public static, but this is bad coding practice for a number of reasons. For one thing, you will find that in larger projects, you'll have methods with the same name that do slightly different things. Usually, these routines are relevant only within a small scope. If the method isn't needed at the public level, don't define it for public access. |
| Q2: | What is a “reasonable” number of classes? |
| A2: | 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. |
Read now
Unlock full access