New FxCop 1.36 beta 2 released

Oct 23, 2007

I’ve always been a big fan of FxCop even though I’ve had my share of problems with some of the rules. The new beta version fixes all that. It works much better with ASP.NET which the previous versions didn’t do very well at all.

There are also some new rules to help you write better software. Especially two rules are popping up everywhere and those are the Specify StringComparison and Normalize strings to uppercase rules.

The Specify StringComparison rule helps you to do string searching in a better way by always specifying a StringComparison enum when you do string manipulation such as IndexOf and LastIndexOf etc.

The Normalize strings to uppercase rule makes sure you use ToUpper or ToUpperInvariant when you normalize strings. It is more efficient to upper case a string than to lower case it.

The design looks very much the same as the 1.35 version with some minor tweaks here and there. It also supports .NET 3.5. Overall, it’s a really good application and a much needed upgrade. You can download it here.

* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Comments (6) -

PWills
PWills United States
10/23/2007 6:29:32 PM #

>>It is more efficient to upper case a string than to lower case it.
Okay I give up... why?

Mads Kristensen
Mads Kristensen Denmark
10/23/2007 6:34:38 PM #

I have no idea. It's been like that since .NET 1.0

Göran
Göran
10/23/2007 7:51:11 PM #

It might be revealed when we can see the source code!?

Göran
Göran Sweden
10/23/2007 9:06:36 PM #

This is what I ment: weblogs.asp.net/.../...et-framework-libraries.aspx

dani
dani Norway
10/24/2007 6:27:27 AM #

>>It is more efficient to upper case a string than to lower case it.

If you follow the link to MSDN it states clearly that the reason for this is primarily the small number of characters that can not make the round trip of being converted to lower and back again without loss.

Levin
Levin People's Republic of China
10/25/2007 3:24:07 AM #

Hey,man,i love your blog articles,they are very helpful.Smile
Thanks sincerely.

Comments are closed

About the author

Mads Kristensen

Mads Kristensen
Program Manager at the Microsoft Web Platform team and founder of BlogEngine.NET.

More...

Month List

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.