There are places in this universe were mortals fear to tread dark
mysterious places replete with shadowy cliffs, hidden treasures, and rumors
of spiritual powers. These places are best left to wizards, hobbits, and
elves and those few who have an unbridled passion for adventure,
challenge, and conquest.
Right now you are either intrigued by where this is going or completely
flabbergasted as to what possible relationship this introduction could have
to Microsoft's .NET. Well, if you observe some developers and how they
approach learning their craft, you would think that making sense of the
internal aspects of this technology is best left to programming gurus and
those few crusaders who dare to tread in the .NET netherworld.
The reality is that understanding the internals of .NET isn't all that
difficult or mysterious, and having good insight into things like garb... (more)
"What's wrong, Uncle John?" I hadn't realized how my facial expressions were
illustrating my inner feelings. I had been working on a new coding project,
and as I worked I became more and more amazed by the native memory management
provided by .NET. It seemed that almost by magic the runtime was able to
figure out which objects were no longer needed and which should hang around,
and - yet more amazing - it could even call special cleanup routines.
"Nothing is wrong, Marissa; I just wish I had time to dive into the automatic
memory management features of .NET," I replied hastily. Ho... (more)
When we left Marissa last month she was getting rather cranky, but now she is
well rested and ready to get down to business. And that business is how
Microsoft .NET manages memory through the use of what is commonly known as
the garbage collector or GC. In the first article in this series [.NETDJ,
Vol. 1, issue 8] we discussed some of the basic concepts behind the garbage
collector. If you haven't had a chance to read that article, now would be a
good time - before you look over the following explanations and advice from
Marissa, my six-month-old niece, who is known far and wide ... (more)
From the perspective of most programmers, the ability to raise an exception
is typically a rather straightforward set of semantics that allows your
program to react to an unexpected situation. But as with most things related
to .NET, there are a variety of under-the-covers "happenings" that allow your
particular programming language to implement a common service without
sacrificing the language's usability or flexibility. Gaining an understanding
of structured exception handling (SEH) will not only help you to develop
systems that are robust, but will also serve as a good introd... (more)
In Part 1 of this series (.NETDJ, Vol. 1, issue 12) we explored some basic
background in regard to .NET threading. We explored concepts related to
threads in general, their appropriate usage, and how to work with the thread
pool in .NET as an alternative to managing our own threads. This month we
will build on what we know and dive deeper into .NET threading. We have a lot
to cover, so let's get started.
Threads: Rolling Your Own.
The easiest way for you to learn about threads is to just jump in and get
your hands dirty. Before we go any further, let's look at some code. I've
cr... (more)