* "Jeff Johnson said:
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
MyShort = MyShort And ValueOf( c )
Is ValueOf() somthing you wrote yourself? I looked in MSDN and the only
place I could find this was under JScript[.NET].
It's pseudo code, or in other words, a method that takes a string
consisting of "0" and "1" characters. 'ValueOf' would return its
integer value.
Still, performance will be bad, especially for longer strings. Natively
supporting binary number /literals/ that are converted at compile-time
would be a far better approach.
Currently, you can use this code to get the behavior of 'ValueOf':
\\\
Public Function ValueOf(ByVal BinaryString As String) As Integer
Return Convert.ToInt32(BinaryString, 2)
End Function
///