Noah Coad

A Microsoft Program Manager on Visual Studio Platform (and an underground coder, lifehacker, hockey player)

Browse by Tags

Tagged Content List
  • Blog Post: Set Difference Minus Operation with LINQ in C#

    Sometimes you want to use a Difference (or Minus) set operation which goes like this: Give me all elements from set A that do not exist in set B.  Or simply put A – B.  The LINQ Except method does this if both sets A and B are of the same type, but frequently the sets are of different types...
  • Blog Post: Eject or Undock a Laptop PC from Command Line or C#

    Took me awhile to find this, so it is worth sharing.  If you have a computer (usually laptop, notebook, etc) with a docking station and want to tell the PC to undock itself from the station from the command line, this is it.  For me the scenario is that I frequently undock my system to take...
  • Blog Post: Delegate Type Inference in C#

    Today I saw some C# language syntax that made me think, "hey, wait a minute, I didn't know you could do that!", so perhaps it'll be new to someone else too.  Honestly, I don't know how I missed this memo. Let's start off with the code, then we'll talk about it.  I'll including some...
  • Blog Post: Pull Web Service Data into Excel

    Visual Studio 2008 has great Office 2007 integration with the ability to essentially open an Excel worksheet from within VS and add C# code as if it was a Windows Forms application.  Just today an acquaintance asked how to pull data off the web and bring it into Excel.  There are many different...
  • Blog Post: A Little LINQ

    LINQ is out in strength and I've got to admit, even though I talked to Anders Hejlsberg over three years ago about it, I've just recently started using it in my own code. There's a lot out on the net about it, but here's my 2c to help people get started. Console . WriteLine ( "MS-DOS 6.21" . Sum ( a...
  • Blog Post: String.Equals Performance Comparison

    I recently had an app that I used the VSTS Profiler on to find that a significant portion of time was spent comparing some long strings. I was using String.Equals(string a, string b, StringComparison.InvariantCultureIgnoreCase) since I didn't care about case or culture. I switched to using OrdinalIgnoreCase...
  • Blog Post: Amazon Short URL RegEx

    When you search amazon.com, it takes you to product pages that have a real long URL. It can be nice and short, so here's a little regular expression to shorten it. Long URL: http://www.amazon.com/Professional-Visual-Studio-System-Programmer/dp/0764584367/ref=sr_1_1/104-4732806-7470339?ie=UTF8&s...
  • Blog Post: HTML Applications (HTAs)

    HTML Applications (HTAs) are DHTML pages that have full local privileges.  They've been around for a long time, but a colleague recently inquired so it was worth remembering.  They're frequently used for splash screens on CD autoruns or as frontends to Windows Scripting Host (WSH) scripts....
  • Blog Post: Rolling Up Status on Work Items

    Say you have a work item type (WIT) that represent a big task, like a Feature, then you have individual Task work items that make up that feature. You want to update the work completed and remaining of the tasks, and have that roll into the corrosponding feature. Today TFS doesn't support work item heiarchy...
  • Blog Post: Get a Web Page's Title from a URL (C#)

    I was creating an app that saves URLs copied to the clipboard into an XML file. This little bit of code came in handy so I thought I'd be worth sharing. This code checks to make sure the URL is to a valid HTML page by first checking the type of request, then checking the header of the page. If it is...
  • Blog Post: TFS Work Item Hierarchy

    Team Foundation Server doesn't natively support work item hierarchy, we all know that. So the question is, how can you create a reasonable workaround to get a work item hierarchy? Of course, all of these techniques require custom reporting, either some fancy SQL Report MDX code, or your own reporting...
  • Blog Post: Outlook C# Extensibility: Contacts Without a Photo

    Gosh I love extensibility. I'd so much rather take the time to write an app to automate a 1min task, if I had to do that task over and over again. MS Office has great extensibility. Here's a quick example of an app to list out all your contacts that don't have a photo on them yet. The point of this is...
  • Blog Post: Register a Custom URL Protocol Handler

    Perhaps you're familiar with such URL protocol handlers such as http://microsoft.com , ftp://user:pass@server outlook:Contacts , file://http://www.coad.net/blog/images/Greenstone.bmp , ms-help://... Want to make your own client-side URL handler? Maybe to pull data from a source and display it, share...
  • Blog Post: Copy Paste HTML From MS Word: IE's DHTML Editing Control (in a .NET WinApp)

    When copy/pasting from MS Word, the HTML it generates is really messy and can't be used verbatim. This has been a pain of mine and many others. I've found that many 3rd party controls, and some client-side blogging tools (like BlogJet) have a miraculous way of converting messy MS Word HTML into something...
  • Blog Post: CoadNet VS Project Templates, Quick Code + Console App for C# in VS05

    Here are two project templates that I created and use on an almost daily basis that I packaged up to share. About a year ago I posted one of my project templates for VS03.NET, “ Creating Quick Tests in C# ”, that became the top VS add-in download on MSDN for a while. This is v2 of that, now...
  • Blog Post: VSWindowManager PowerToy - VS Plugin for Tool Windows Management

    I was checking out an MSDN Magazine post on “ Visual Studio Add-Ins Every Developer Should Download Now ” and came across this great VS Plug-in for managing window layouts, VSWindowManager PowerToy . I use a laptop for development, and while it has decent resolution (1400x1050), I’m...
  • Blog Post: XPathmania - XPath in VS

    This is a cool little plug-in from DonXML for VS that lets you run XPath statements against the currently opened XML document. I’ve been waiting for something like this!! I write a lot of XPath and this sure makes testing the expressions sooooo much easier. Thanks to Jason Haley for posting...
  • Blog Post: Tip: Beautifully Formatted .NET C# Code in Blog Post

    I’ve been searching for a way to nicely display code on my blog for a long time!! These old posts prove it Well Formatted Blog, Can't Directly Copy from MS Word and Moving Away from Word Based Blogs . I think I’ve on to something now! Here’s a snippet, like it? I just copy code to...
  • Blog Post: Simple FTP Upload in C# w Free FTP DLL

    Two nights ago I created an app that lets me just right-click a file in Windows Explorer and it uploads the file to my FTP site in a temp directory so I can quickly and easily share files with friends. Just click it’s uploaded, and click the resulting URL is copied into the clipboard to be pasted into...
Page 1 of 1 (19 items)