What Was I Thinking?

Follies & Foils of .NET Development
posts - 85 , comments - 251 , trackbacks - 0

April 2008 Entries

QuickTip: Case Insensitive Dictionaries
I've often thought about making my own implementation of a Dictionary<K,V> where the key values are case insensitive. Its been one of those things on my ever-growing to-do list. I usually end up casting the key values to all uppercase and try to encapsulate all my calls the the dictionary with my own logic that performs the case conversion. A case insensitive dictionary would avoid all that nastiness. Sometimes it's helpful to read the tooltip overloads. As I coded a new dictionary instance ......

Posted On Wednesday, April 30, 2008 3:28 PM | Comments (2) | Filed Under [ Visual Studio ]

QuickTip: Debugging VBS Files with CScript.exe and Visual Studio
This is another one of those "Posted here for MY convenience" tips. You can use the Visual Studio Debugger to debug a .vbs (vbscript) file executed with cScript.exe by using the //X flag at the command line. To debug MyTest.vbs cscript.exe MyTest.vbs //X The //X will set a breakpoint and invoke the "select a debugger" dialog where you can choose Visual Studio and step into your vbs code. I haven't found a way to directly edit from the debugger however, so I end up having to debug, break execution, ......

Posted On Monday, April 14, 2008 11:26 AM | Comments (10) | Filed Under [ Visual Studio ]

QuickTip: Performing work on a new thread using anonymous delegates
I know this is available other places on the web, but I'm posting it here because I often have to search for it. This tip is more for my benefit than others :) class Program { public static void Main() { Thread t = new Thread(delegate() { SayName("Lou","Costello"); }); t.Start(); } protected static void SayName(string firstName, string lastName) { Console.WriteLine(firstName + " " + lastName); } } ......

Posted On Monday, April 7, 2008 8:39 PM | Comments (1) | Filed Under [ Visual Studio ]

Powered by: