Click here to Skip to main content
15,892,298 members
Articles / Web Development / ASP.NET

Best practices in developing ASP.NET applications

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
19 Jan 2011CPOL 9.8K   3  
I agree with Chris...string.IsNullOrEmpty: 312 msLength: 140 ms [fastest]This is not a fair comparison.Need to compare:(string != null && string.Length !=0)with: String.IsNullOrEmpty(string)Even if the first construct is faster, there is a readability...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
3 Feb 2011_impostor_
Initializing is great... unless you have no control over the contents.Consider this:String strTmp = String.Empty;strTmp = SomeRandomMethod();//Suppose SomeRandomMethod returns null under some circumstances...Now anything you try to do with strTmp (other than compare to null) will...
Please Sign up or sign in to vote.
19 Jan 2011Mahendra Vishwakarma 2 alternatives  
Best practices in developing ASP.NET applications

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions