Geeks With Blogs
Benjamin Howarth, Code Gecko

Lots, according to the comments on this post!

I finally settled on:

if (int.TryParse(isNewList, out isNewList) != false) {}

 

It conspires that TryParse has a try...catch block built into it, and returns false if it can't convert from a string to a number (i.e. if it's NaN).

CodeGecko

Posted on Tuesday, January 13, 2009 11:46 AM | Back to top

Copyright © TheInspiredGecko | Powered by: GeeksWithBlogs.net