title: Force a NULL or unknown type value to an integer in Visual Basic
body: <p>I want a fail-safe way to force an int, in my current situation i'm declaring a zero early but it's been nagging me. I like to be direct, fast, and clean. I can presume some responses already, but after using this method in javascript i found that it was quite efficient when i needed an integer value. I know javascript is very forgiving, i am looking to eventually write safe signal processing code for whatever industry so fast methods which will round off safely, and turn nulls and nothings to zeros rule. </p>
  
  <p>To be clear again, I need a working replacement for </p>
  
  <p><code>Y = ~~(X)</code></p>
  
  <p>which i've used happily in JavaScript, but i can't do <code>~</code> Character in Visual basic. it's fine if there isn't i'm just wondering.</p>