Click here to Skip to main content
16,010,650 members

Articles by _impostor_ (Tip/Tricks: 2)

Tip/Tricks: 2

RSS Feed

Average article rating:

No articles have been posted.

Average blogs rating:

No blogs have been submitted.

Average tips rating: 5.00

Web Development
ASP.NET
19 Jan 2011   Updated: 19 Jan 2011   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 10,250     Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
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...
31 Jan 2011   Updated: 3 Feb 2011   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: CPOL    Views: 9,420     Bookmarked: 5   Downloaded: 0
Please Sign up or sign in to vote.
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...

Average reference rating:

No reference articles have been posted.

Average project rating:

No projects have been posted.
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.