Here is how to convert one number base to another (i.e. base 10 [decimal] to base 2 [binary]) in C# .net
Firstly Hexidecimal (base 16) to binary (base 2)
string binaryval;
binaryval= Convert.ToString(Convert.ToInt32(fromhex[i], 16), 2);
Next, Decimal (base 10) to Hex (base 16)
int yourinteger=100;
string hex=yourinteger.ToString(”X”);
Next, Decimal (base 10) to binary (base 2)
string bin=Convert.ToString(YourInteger, 2);
Hope this helps!