Link to home
Start Free TrialLog in
Avatar of Seven price
Seven priceFlag for United States of America

asked on

convert function

trying to convert this function to c#
trying to move from vb to c#

 Function MakeByte(ByVal text As String) As Byte()

        Dim i As Integer
        Dim ba(text.Length - 1) As Byte
        For i = 1 To Len(text)
            ba(i - 1) = Asc(Mid(text, i, 1))
        Next

        Return ba

    End Function
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Seven price

ASKER

I did that in the converter but the string still came up error until I compliled it. Wonder why ?