Microsoft MVP, Software Architect, Developer, Author
"Deuces you say", there is no difference...right? Wrong! In the C# language, using is a keyword. Unfortunately, this is one of those times that a single keyword has multiple uses: As a preprocessor directive used to create an alias for a namespace or to import types defined in other namespaces. As a statement used to define a scope at the end of which an object will be disposed. It's unfortunate that Microsoft chose to attach multiple meanings to this keyword as it tends to cause a lot of confusion ......
I don't know about you, but I get lots of email spam, most of which I just completely ignore. I do, however, periodically review what lands in my "Junk e-mail" folder to make sure something wasn't put there by mistake. As a result, the first email in the list always ends up getting displayed. I'm not trying to make a political statement in any way at all, and whatever your views on the current U.S. military actions in Iraq aside, this latest form of email spam is just downright revolting. This spam ......
I try not to post things that aren't technical like this, but every once in a while something comes my way that just stands out and is so impressive that I make an exception. These were video clips sent to me by family and both of these performances are truly amazing. This is a hand shadow show by Raymond Crowe, set to the music of "What a Wonderful World" as sung by Louis Armstrong. This is a video of the french mime Jerome Murat. I'm not usually much for mimes, but this is absolutely incredible ......
I'm a big fan of Windows Live Writer and use it almost exclusively to write my blog posts. As a result of this, I'm always on the lookout for new and useful plug-ins. Since I have accumulated quite a few of them, I thought I'd share my favorite plug-ins. These are listed in no particular order. SkyDrive Embed Plugin Allows you to easily embed a file or folder from your public Windows Live SkyDrive account. You can specify 3 different embed formats. Paste MSDN URL Allows you to paste a URL from any ......
Recently, I posted an article on Code Project about data binding an enumerated type with support for custom and localizable descriptions to any UI element that supports data binding. It was pointed out in the article comments that this class is a perfect candidate for .NET 3.5 extension methods. I have just updated the article to show how easy it is to convert the methods to be extension methods ......
During my talk on Garbage Collection in .NET at the Jacksonville Code Camp 2007, Joe Healy mentioned that I should take a look at the changes made to the GC in the .NET Framework 3.5 release. (This is based on the Beta 2 release, but it should be pretty stable at this point.) After doing some research using the SSCLI 2.0 code base to look at the GC class as it exists in .NET 2.0 and Reflector to look at it in .NET 3.5, I found the single change that was made. (For those of you wondering why I used ......
If you're going to the Jacksonville Code Camp 2007, be sure to check out my sessions. I'm giving two talks: Garbage Collection in .NET, Room 140/141, 10:20 AM - 11:30 AM Code Styles and Standards (Chalk Talk), Room 102, 1:50 PM - 3:00 PM Jacksonville Folder Jacksonville If you make it and go to my sessions (or even if you don't), the presentations are available for download on Windows Live SkyDrive in the Jacksonville Code Camp folder ......
In keeping with the work I did for Tech·Ed 2007 and the Tampa Code Camp to create Internet Calendars for the different technical tracks, I have created a similar calendar for the Jacksonville Code Camp. The calendar is available from Microsoft Office Online as an Outlook 2007 Internet Calendar Subscription. If you are still using Outlook 2003, there is an open-source add-in that allows you to work with Internet Calendars ......
As I mentioned in my previous post, if you create an extension method with the exact same signature as an existing method your extension will be ignored. However, one thing that I didn't mention is that if the extension method has a different signature, it will show up in that methods overload list. To make this a little bit clearer, if you create the following extension method 1: namespace DataValidationHelpers 2: { 3: public static class DataValidation 4: { 5: public static string ToString(this ......
Exception handling seems to be a common problem for .NET developers, particularly younger developers. We pretty much all know that you should wrap operations that have the potential for failing in a try/catch block if you are interested in being able to do something about the error that occurred. I'm not going to talk about the rules and guidelines for using exception handling. Instead I'm going to focus on a particular aspect of exception handling, which I tend to call exception bubbling. Exception ......
At one time or another most of us have wished we could add functions to one of the intrinsic .NET classes. The solution has always been to either create a static (or sealed) class that contains these "helper" functions or derive a new class that adds the desired functionality. A good example of this is testing a string to see if it contains only alphanumeric characters. In order to do this, we need to define a helper class: 1: namespace DataValidationHelpers 2: { 3: public static class DataValidation ......
My article on using managed code to detect what versions and service packs of the .NET Framework are installed on a system has been updated to account for a minor registry change between the January 2007 CTP and Beta 2. Along with that article, the article on using managed code to detect if IIS is installed and ASP or ASP.NET is registered has also been updated with the same fix ......
Just yesterday I mentioned that I updated my FileDownloader article and class on The Code Project. In that post, I mentioned that there was another update pending that added the ability to set the User-agent HTTP header. I received the notification from The Code Project this morning that they have updated the article so this new feature is included in the download. Remember, these changes are only available in the .NET 2.0 version of the class ......
It's been a while since I wrote the first version of my FileDownloader article and class. Since that time, there have been a lot of positive comments about the article and a handful of feature requests. I finally made the time to update the classes and the article and resubmit it to The Code Project. This update has the following new methods and properties: BlockSize Gets or sets the download block size in Kilobytes (KB). DownloadHtml Gets or sets a value indicating if HTML pages should be allowed ......
I finally felt it was time to put an "About me" type entry on my blog so you can get to know me a little bit better. There are already several links to various profiles that I maintain on LinkedIn, The Code Project, and Community Credit, but they don't really tell you who I am. I have also started to become more involved in the off-line community as well by speaking at different events. As a result, I have consolidated a lot of the information available in the different profiles, added my speaking ......
While I was getting the Code Project Add-in for Visual Studio working on Visual Studio 2008 Beta 2, I decided to see if I could get the SlickEdit Gadgets for Visual Studio 2005 working as well. It turns out, with a little bit of registry tweaking, they work under Visual Studio 2008 Beta 2 without any problems (so far). This is by no means a supported configuration from SlickEdit and requires modifying the registry, so you should do so only after making the necessary backups and any other precautions ......
I received an email today through my blog from one of the developers at SlickEdit, who also happens to be a member of The Code Project community, letting me know about a new Visual Studio Add-in they have developed. You may remember I blogged about the free SlickEdit Gadgets, a really great set of Add-ins for Visual Studio. Since I am also a member of The Code Project community, I spend a lot of time on the web site answering forum questions and reading the articles posted. I also spend a lot of ......
I decided to turn my blog post on data binding an enum into an article on Code Project as well. I did this for two reasons: It gives the topic a much wider audience It provides a ready to use solution with the source code so you don't have to copy & paste it from the blog entry This article (or blog post) should provide a clean and simple way to allow you to bind an enumerated type with support for custom and localizable descriptions to any UI element that supports data binding ......
A few months ago, I earned my Microsoft Certified Professional Developer (MCPD): Windows Developer certification. At that time, I had mentioned that there were not many people who have earned this particular certification. That comment was based on feedback from the Microsoft Certified Trainers (MCTs) that were helping run the testing center at Tech·Ed. It turns out that last month, Microsoft released the official statistics of the number of Microsoft Certified Professionals (MCPs) around the world. ......
A few days ago, I wrote about automatic properties in the upcoming release of C#. While this is a cool feature, it does have some practical limitations once you need to go beyond simple get/set logic. Another new feature coming up is the idea of object initializers. Object initializersare an important aspect of the Linq extensions to .NET, but they aren't limited to being used only in Linq expressions. If you are familiar with attribute programming, you have probably used something similar. In most ......
I just found out that my good friend Joe Wells has accepted an offer from Lavasoft to be the new Chief Technology Officer (CTO). Joe is very well known for his extensive career in the software security field, having authored more than 60 technical papers and founding the WildList Organization International. He has worked with such well-known companies as Symantec, IBM, and Sunbelt Software. According to the press release, he "will lead all technical initiatives for Lavasoft, including development ......
A while ago, I blogged about Windows Live Folders being in a closed beta. Yesterday, they just announced a name change to Windows Live SkyDrive and their first public beta. According the the SkyDrive team, this beta has: An upgraded look and feel — new graphics to go along with the new features! "Also on SkyDrive" — easily get back to the SkyDrives you’ve recently visited Thumbnail images — now you can see thumbnails of your image files Drag and drop your files — Drag and drop your files right onto ......
Defining properties can be very tedious. Suppose you have a class 1: public class UserProfile 2: { 3: private int userrId; 4: private string firstName; 5: private string lastName; 6: 7: public int UserId 8: { 9: get { return this.userId; } 10: set { this.userId = value; } 11: } 12: 13: public string FirstName 14: { 15: get { return this.firstName; } 16: set { this.firstName = value; } 17: } 18: 19: public string LastName 20: { 21: get { return this.lastName; } 22: set { this.lastName = value; } 23: ......
Scott Guthrie has a great blog post about some really cool editor improvements in Visual Studio 2008. As Scott points out, one of the big annoyances with VS2005 as the fact that the intellisense window obscures any code behind it. In VS2008, if you hold down the "Ctrl" while the Intellisense window is visible it will switch to a semi-transparent mode that allows you to see the code beneath it. When you release the "Ctrl" key, it switches back to normal. There are a lot of improvements for VB developers, ......
I recently straightened up my home office and decided to move the printer to a different corner of my desk. Of course, the corner I wanted it at was about as far away from the computer as possible and I didn't have a long enough parallel port cable (and I'm not even sure they make them long enough anyway) so I decided to get a print server. I already have a wireless 4-port router and an old but trustworthy HP LaserJet 2100, so all I needed was a print server. I know I could have upgraded to a newer ......
Microsoft has just released two updates for Windows Vista that address some of the performance and reliability issues people have been seeing. These updates are a precursor to the upcoming Windows Vista SP1 release. You can get more details and download them from here: Windows Vista Performance Update (KB 938979): x86 Download x64 Download Windows Vista Reliability Update (KB 938194): x86 Download x64 Download ......
I periodically look at my blog statistics, more out of idle curiosity than anything else. As part of that, I look at the referrers to the various blog posts. Today, as I was browsing my referrer list, I noticed that one of the referrers was Wikipedia. Intrigued, I took a look at the entry, and my blog post about the Visual Studio 2008 launch date was listed as a reference ......
I blogged a few days ago about the upcoming release of the August CTP for Visual Studio "Rosario". It seems I was just a day too soon. The CTP was released on Saturday as a Virtual PC (VPC) image. The majority of new features that are part of the CTP are centered around improvements in Team System, most notably in the areas of quality and testing. From Brian Harry's blog, This CTP delivers a mix of features supporting both scenarios - including an update MSF CMMI template, user definable links types, ......
I've blogged about Snap Shots in the past and think it's an excellent addition to any website. Now, you can have the power of Snap Shots on any website through the Snap Shots add-on for Internet Explorer or Firefox. These add-ons bring the usefulness of Snap Shots to all websites, and takes everything you love about Snap Shots for your website and puts on the websites you visit every day. Snap has profiled a large group of the most popular sites that you use every day, including Google, Yahoo!, MySpace, ......
Short on the heals of the Visual Studio 2008 Beta 2 release, we will soon have the first public Community Technology Preview (CTP) of Visual Studio "Rosario". According to Brian Harry, Microsoft product unit manager for Team Foundation Server, Microsoft has been working on Rosario since September of last year. The result should be a shorter time period between the 2008 release and the Rosario release. There aren't many details about what will be included in the Rosario release, but the CTP should ......
In case you don't know about MZ-Tools, it is easily the best Visual Studio .NET add-in available. This started in 2000 as an add-in for the Visual Basic 6 IDE, which is where I was first introduced to it. Since then, I have followed it's evolution into a Visual Studio .NET add-in for all four VS.NET releases. MZ-Tools has just released version 6, which provides support for all of the VS.NET releases, including Visual Studio 2008, into a single add-in. There were a few minor bug fixes and enhancements ......
Every once in a while I need to bind an enumerated type to a Windows Forms control, usually a ComboBox. The simplest is to use the Enum.GetValues() method, setting its result to the DataSource property of the ComboBox. If you have the following enum: 1: public enum SimpleEnum 2: { 3: Today, 4: Last7 5: Last14, 6: Last30, 7: All 8: } You can bind it to a ComboBox like this: 1: ComboBox combo = new ComboBox(); 2: combo.DataSource = Enum.GetValues(typeof(Simpl... While this does work, there are ......