|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
converting from TextBox1.Text to Byte()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 Jason,
That needs no snippet, the text.encoding class is complete for that. http://msdn2.microsoft.com/en-us/library/system.text.encoding.getbytes.aspx I hope this helps, Cor "Jason" <ja***@acd.net> schrieb: 'System.Text.Encoding.<encoding>.GetBytes'.> 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. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Create a custom collection
How to re-acquire the Text from a combo box Anyone used Socketwrench? Problem With Insert into MySQL DB using VB.Net 2005 COBOL Packed decimal converter to VB decimal Capture and redirect TCP traffic filewatcher file modification What mvp use for printing Random String labels |
|||||||||||||||||||||||