title: Best way to read oracle number from stored procedure into a variable in c#?
body: <p>I have a number of stored procedures, and I've been trying to find the best way to get an int in C# out of a stored procedure out parameter. So does anyone have advice on the best way to do this? Also, in some of the procedures the returned value can be null, so using nullable ints for them would be preferred. I have been doing it like this, but is there a better way? (Also, this is how I'm dealing with nulls currently, since 0 isn't a valid result for those procedures)</p>
  
  <pre><code>int sequence = 0;
  int.TryParse(comm.Parameters["osequence"].Value.ToString(), out sequence);
  </code></pre>
  
  <p>Basically I am wondering if there is a way to cast without having to parse. I had been trying but eventually gave up and settled with this, since it seems to work.</p>