September 2002
Intermediate to advanced
496 pages
10h
English
Every object in a .NET application passes through three major stages during its life cycle:
Constructing
Working with object
Disposing
To make our samples real rather than theoretical, we illustrate the above stages on the StringBuilder class objects. StringBuilder is located in the System.Text namespace. It provides some methods for an easy string building, as follows from its name.
You can construct an object of a class by calling the new class method—the same method-calling syntax as in Core Perl:
my $obj = StringBuilder->new();
As a result, our program allocates memory for storing an object, and the invoked constructor performs some initialization. If there were no errors, then the new method returns a ...