New FxCop 1.36 beta 2 released

by Mads Kristensen 24. October 2007 03:12

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.

* Only $4.95/month ASP.NET & Windows 2008 + IIS 7 Hosting! FREE SQL Included

Tags:

General

Comments

10/24/2007 3:29:32 AM #

PWills

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

PWills United States |

10/24/2007 3:34:38 AM #

Mads Kristensen

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

Mads Kristensen Denmark |

10/24/2007 4:51:11 AM #

Göran

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

Göran |

10/24/2007 6:06:36 AM #

Göran

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

Göran Sweden |

10/24/2007 3:27:27 PM #

dani

>>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.

dani Norway |

10/25/2007 12:24:07 PM #

Levin

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

Levin People's Republic of China |

Comments are closed

About the slave

Mads Kristensen Mads Kristensen
Web developer at ZYB and founder of BlogEngine.NET. More...

LinkedIn ZYB Facebook Last.fm Twitter View Mads Kristensen's profile on Technorati

The Lounge

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008