Case-insensitive string compare in .NET

I've been writing code full-time in C# for about 4 years now but every once in a while someone shows me something totally new.  Last week, one of the devs on my team showed me an override of String.Equals() that does a case-insensitive compare.  It kinda blew my mind that I'd never seen that before.

The following line of code evaluates to true.

string.Equals("string number 1", "String NUMBER 1", StringComparison.CurrentCultureIgnoreCase) 

There is also a similar override of String.Compare().

Pretty handy, huh? 

-Ben

Delete a Team Project from Team Foundation Server

Wow...it's been a while since I last wrote a blog post.  It's been a busy month and I've started ramping up to teach Team Foundation Server classes for the Richard Hale Shaw Group.

Anyway, as I'm doing research, I keep finding the answers to non-obvious questions in TFS.  The one that was getting to me was how do you delete a team project that you don't need anymore?  It certainly isn't obvious (translation: possible) through the Team Explorer user interface. 

Answer: go to the Visual Studio 2005 command prompt and use “TfsDeleteProject.exe“. 

Example:

TfsDeleteProject /server:myteamserver.benday.com “Project Name“

There are a lot of other command line and API options in TFS that I'll hopefully get posted up to the blog soon. 

-Ben

 

--- Looking for training or consulting for Team Foundation Server and Visual Studio Team System?  Contact me via http://www.benday.com