title: Get/Set as different types
body: <p>I'd like to define a variable that will accept a string in the SET, but will then convert it to an Int32 and use that during the GET.</p>
  
  <p>Here the code that I currently have:</p>
  
  <pre><code>private Int32 _currentPage;
  
  public String currentPage
  {
     get { return _currentPage; }
     set 
     {
        _currentPage = (string.IsNullOrEmpty(value)) ? 1 : Convert.ToInt32(value);
     }
  }
  </code></pre>