AscB function not supportes

mauleTTT

Freshman
Joined
Mar 27, 2003
Messages
36
Hi all, anyone knows how to make this in VB .NET ?

The function AscB is not yet supported by .NET.

Code:
fnclngLeftShift(AscB(Mid(strMissatge, lngContByte + 1, 1)), lngPosByte)

The problem is in the AscB function. I don't know, how to do this, or how to substitute the AscB function.

Sorry for my english.

Thanks.
 
What is your program trying to do? There may be a much simpler .NET way of achieving your goal.
 
What is the function of your program going to be? What do you need
AscB() for?
 
The AscB function is used in a procedure, that converts a string in a byte array of that string.

The objective it's make an implementation of the MD4 message-digest algorithm.

I'm only want to know if anyone knows how I can get the first byte of one char of a string.


Thanks
 
You can convert a string to a byte array like this:
Visual Basic:
Dim bArray() As Byte

bArray = System.Text.ASCIIEncoding.ASCII.GetBytes(myString)

Yay! 500th post! :)
 
Thanks for the answer, but the AscB function, returns only the first byte of a character, I don't want the entire collection.

I don't know if I'm explaining well, sorry for my english.

Thanks
 
The point is, you don't *have* to do all that work - you can convert a string to a byte array with what VolteFace showed you.
 
If you want only the first byte, do what I told you to, and then just
use bArray(0) to get the first byte in the array.
 
Back
Top