954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

I need a help, plz (first post)

What is the code for converting from binary to decimal???????? :rolleyes:

kyakobi84
Newbie Poster
14 posts since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

Have you tried this code:

Dim strBinary As String = "11111111"
Dim intValue As Integer
Dim iPos As Integer
Dim iVal As Integer

For iPos = 0 To strBinary.Length - 1
       iVal = strBinary.Substring(strBinary.Length - iPos - 1, 1)
       intValue = intValue + iVal * 2 ^ iPos
Next


You can get more info at http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21259781.html

:mrgreen: For more help, www.NeedProgrammingHelp.com

NPH
Junior Poster in Training
55 posts since May 2005
Reputation Points: 10
Solved Threads: 1
 

Thx for replying me, i will try this code now

kyakobi84
Newbie Poster
14 posts since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

It worked , thaaanks alot :cheesy:

kyakobi84
Newbie Poster
14 posts since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You