Byte to Integer in c#

Posted by jtb on Stack Overflow See other posts from Stack Overflow or by jtb
Published on 2010-06-15T15:47:40Z Indexed on 2010/06/15 15:52 UTC
Read the original article Hit count: 272

Filed under:
|
|

I am reading a row from a SQL Server table. One of the columns is of type tinyint.

I want to get the value into an int or int32 variable.

rdr.GetByte(j) 
(byte) rdr.GetValue(j)

...seems to be the only way to retrieve the value. But I can't figure out how to get the result into an int var.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET