title: Convert/Cast String to Integer using Mono for Android
body: <p>Easy question, I know.  But failing nonethless!</p>
  
  <p>In C sharp you can simply type:</p>
  
  <pre><code>string mystring = "4";
  
  int myint = convert.toint32(mystring);
  </code></pre>
  
  <p>I am getting a Null Unhandled Exception leading me to suspect this does not work using MonoDroid.  So I dug into the API and found the Cast class which supposedly lets you covert between int and string class types.</p>
  
  <pre><code>[Android.Runtime.Register("cast", "(Ljava/lang/Object;)Ljava/lang/Object;", "")]
  public Object Cast (Object obj)
  </code></pre>
  
  <p>However none of my attempts to utilize the class have worked. The below fails:</p>
  
  <pre><code>int myint= Class.Cast(mystring);
  </code></pre>