Prev | Current Page 76 | Next

Guy Fouch?©, Trey Nash

"Accelerated VB 2008"

The cool
thing is that, since even the built-in types of the language are plain-old common language runtime
(CLR) objects, the objects you create are on a level playing field with the built-in types. In
other words, the built-in types don??™t have special powers that you cannot muster. The cornerstone
for creating these types is the class definition. Class definitions, using the Class keyword,
define the internal state and the behaviors associated with the objects of that class??™s type.
Along with classes, the VB language supports the definition of new value types through
the Structure keyword. A Structure is a lightweight object that cannot inherit from another
class or Structure, nor can another Structure or class inherit from them.
VB, along with the Visual Studio Integrated Development Environment (IDE), is an excellent
tool to facilitate rapid application development. While the CLR can be daunting at first,
you can put together reasonable applications without knowing every single detailed behavior
of the language. As you build applications and gain understanding of the VB language and the
CLR, the more effective you??™ll become at developing and designing robust applications.
Class Definitions
Let??™s go ahead and have a look at a simple class now so you can get a feel for things:
Public Class Customer
'Fields/Members
Private mName As String
Private mCustomerID As Integer
'Constructor
Public Sub New()
MyBase.


Pages:
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
wierszyki życzenia pensjonaty w beskidach pozycjonowanie katalog stron