Answers for Hour 17

   

Answers to Hour 17

1:

To create objects, you must first create a template. This template is called a:

A1:

Class

2:

One of the primary benefits of object-oriented programming is that objects contain both their data and their code. This is called:

A2:

Encapsulation

3:

With static classes, public variables and routines are always available to code via the static class in other modules. Is this true with public variables and routines in classes?

A3:

No. To access the public variables and routines, an object must be instantiated from the class.

4:

True or False: Each object derived from a class has its own set of class-level data.

A4:

True

5:

What must you do to create a property that can be read but not changed by client code?

A5:

Create a property procedure that includes the get accessor, but not the set accessor.

6:

What is the best way to store the internal value of a property within a class?

A6:

As a private class-level variable

7:

Which is generally superior , early binding or late binding?

A7:

Early binding

8:

What is the best way to release an object you no longer need?

A8:

Call the object's Dispose() method if it has one, and then set the object variable to null.


   
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