I had to overcome two big obstacles in writing this book. The first was the three years I invested in discovering these secrets, then writing and debugging to ensure they worked on every platform and in every possible situation. The second was organizing them.
The .NET world is a huge one, and not everything can be easily categorized. We ve already covered some of the biggies: Windows applications, Web sites, databases, and special project types. This chapter covers most of the other stuff.
Split into seven subsections, the following pages examine working with the Internet; manipulating files and folders; dates, numbers , and strings; graphics and fonts; using the registry and event log; distributed computing; and useful Visual Studio .NET tips.
It was, probably, one of most exciting chapters to write. It provides ready-to-run golden code snippets that show you how to give your application extra intelligence through the use of clever code. It shows you how to do things most .NET developers will never even be aware that the language is capable of.
I ll show you how to convert HTML to pure text, and in just a couple of lines of code. You ll be given a function to add a Web shortcut to the Favorites menu. I ll demonstrate how to transform bytes into an English file size , like 1.44MB. You ll uncover the secrets of generating memorable user passwords, plus discover how to put together your own .NET screensaver and learn the tricks of encrypting data with just twelve simple lines of Visual Basic code. The advanced stuff is covered here too: XML, transactions with COM+, MSMQ, and more.
It s diverse, but it s fun. These are the code snippets you ll learn once and never forget.