I needed a way the other day to convert a few hexadecimal and binary addresses to integers. I figured I would share what I found. Below you will find the way to convert to and from arbitrary bases in vb.net.

-Mike

### Binary to Integer

Replace “binary” with the binary number.

`Convert.ToInt32(binary, 2)`

### Hexadecimal to Integer

Replace “hex” with the hexadecimal code.

`Convert.ToInt32(hex, 16)`