Bug Vanquisher

21 September 2007

Crimes in ASP.Net Web Forms

Filed under: Bugz, Dev inside! — Tanveer Badar @ 2:59 PM
  • new EventArgs( ), instead of EventArgs.Empty.
  • code.ToString( ), even when typeof( code ).Name is "String".
  • status.ToUpper( ) == "COMPLETED", instead of string.Compare( status , "completed" , true ) == 0
  • System.DateTime.Now.GetType( ) instead of typeof( System.DateTime ) and many similar variations like ( new String( ) ).GetType( ), System.Int32.MaxValue.GetType( ) etc.
  • btnClose_Click( null , null ) instead of btnClose_Click( this , EventArgs.Empty ).
  • Session [ "Name" ] != "" , when the correct code is Session [ "Name" ] != null && !string.IsNullOrEmpty( ( string )Session [ "Name" ] )
  • [Serializable()], when [Serializable] will do
  • _NAME = null; even when _NAME is a class member and not a value type.

And they call me perfectionist!

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: