Home > Archive > Visual Basic Syntax > January 2006 > .net types
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
|
Does anyone have a snippet of code that will convert a character string to a
byte array? I've nearly smashed my head against the wall trying to figure
this out.
I'm Using vb.net 2003
The problem that I am running into is that System.Type.GetType("Byte")
returns null. Anybody know why? I've tried code similiar to the following
to achieve my results:
Dim theCommand as New ArrayList
For each c as Char in InputTextBox.Text.ToCharArray()
theCommand.Add(c)
Next
Dim TempArray as Byte()
TempArray = theCommand.ToArray(System.Type.GetType("Byte"))
' The above line should give me a byte array of the previous text, but
instead it just errors saying that System.Type.GetType("Byte")) is null
Any Ideas?
Thanks in advance,
-- Jason
| |
| Michael Cole 2006-01-10, 9:59 pm |
| Jason wrote:
> Does anyone have a snippet of code that will convert a character
> string to a byte array? I've nearly smashed my head against the wall
> trying to figure this out.
>
> I'm Using vb.net 2003
--
<response type="generic" language="VB.Net">
This newsgroup is for users of Visual Basic version 6.0
and earlier and not the misleadingly named VB.Net
or VB 200x. Solutions, and often even the questions,
for one platform will be meaningless in the other.
When VB.Net was released Microsoft created new newsgroups
devoted to the new platform so that neither group of
developers need wade through the clutter of unrelated
topics. Look for newsgroups with the words "dotnet" or
"vsnet" in their name. For the msnews.microsoft.com news
server try these:
microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb
</response>
--
Regards,
Michael Cole
|
|
|
|
|