petbo2 Posted November 10, 2004 Posted November 10, 2004 Hi everyone! Quick question: I have a string with a byte code in it (e.g 142), and I want to convert it to a byte... How do I do this? Also, does anyone have an efficient method in removing one character many times from a string? e.g remove "b" from this string: 567b9898b969b798b098b? Thanks, Pete Quote
Administrators PlausiblyDamp Posted November 10, 2004 Administrators Posted November 10, 2004 For the 1st one you could do something like Dim s As String = "142" Dim b As Byte b = Byte.Parse(s) for the second something like Dim s As String = "567b9898b969b798b098b" Dim s2 As String s2 = s.Replace("b", String.Empty) should do the trick Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.