title: VB6 function AscB equivalent in VB.net
body: <p>I am trying to use some VB6 code in a .net app. It uses a function AscB which is no longer availiable. What would I need to use in .net?</p>
  
  <p>Extract of how the function is used (function in third line from end)....</p>
  
  <pre><code>' Combine each block of 4 bytes (ascii code of character) into one long
  ' value and store in the message. The high-order (most significant) bit of
  ' each byte is listed first. However, the low-order (least significant) byte
  ' is given first in each word.
  lBytePosition = 0
  lByteCount = 0
  Do Until lByteCount &gt;= lMessageLength
      ' Each word is 4 bytes
      lWordCount = lByteCount \ BYTES_TO_A_WORD
  
      ' The bytes are put in the word from the right most edge
      lBytePosition = (lByteCount Mod BYTES_TO_A_WORD) * BITS_TO_A_BYTE
      lWordArray(lWordCount) = lWordArray(lWordCount) Or _
          LShift(AscB(Mid(sMessage, lByteCount + 1, 1)), lBytePosition)
      lByteCount = lByteCount + 1
  Loop
  </code></pre>
  
  <p>Thanks</p>