473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Re-Use ByteArray? is that possible? How?

Greetings I have the following code:

Dim binary_data As Byte() = {&HAA, &HD0, &H15, &HB, &H10, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H56}
objPort.Write(SerialNET.Port.ByteArrayToString(bin ary_data))

Now i want to re-use the bytearray variable "binary_data" to store new
values. Something like:

binary_data = {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &HD7}

but it wont compile.
Can you please tell me how i can re-use "binary_data" to store new values?
Thanks in advance!
Dec 8 '05 #1
6 1179
"Michael Barrido" <jm***@hotmail.com> schrieb:
Dim binary_data As Byte() = {&HAA, &HD0, &H15, &HB, &H10, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H56}
objPort.Write(SerialNET.Port.ByteArrayToString(bin ary_data))

Now i want to re-use the bytearray variable "binary_data" to store new
values. Something like:

binary_data = {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &HD7}

but it wont compile.
Can you please tell me how i can re-use "binary_data" to store new values?


\\\
BinaryData = New Byte() {...}
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 8 '05 #2
"Michael Barrido" <jm***@hotmail.com> schrieb
Greetings I have the following code:

Dim binary_data As Byte() = {&HAA, &HD0, &H15, &HB, &H10,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H56}
objPort.Write(SerialNET.Port.ByteArrayToString(bin ary_data))

Now i want to re-use the bytearray variable "binary_data" to store
new values. Something like:

binary_data = {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &HD7}

but it wont compile.
Can you please tell me how i can re-use "binary_data" to store new
values? Thanks in advance!


Do you want to use the same array and put the new values in, or due you want
to create a new array containing the new values? To do the latter:

binary_data = new byte() {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &HD7}
Armin

Dec 8 '05 #3
Thank you! :-)
"Armin Zingler" <az*******@freenet.de> wrote in message
news:ev*****************@TK2MSFTNGP15.phx.gbl...
"Michael Barrido" <jm***@hotmail.com> schrieb
Greetings I have the following code:

Dim binary_data As Byte() = {&HAA, &HD0, &H15, &HB, &H10,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H56}
objPort.Write(SerialNET.Port.ByteArrayToString(bin ary_data))

Now i want to re-use the bytearray variable "binary_data" to store
new values. Something like:

binary_data = {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &HD7}

but it wont compile.
Can you please tell me how i can re-use "binary_data" to store new
values? Thanks in advance!


Do you want to use the same array and put the new values in, or due you
want to create a new array containing the new values? To do the latter:

binary_data = new byte() {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &HD7}
Armin

Dec 8 '05 #4
Thank you! :-)
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Or******************@TK2MSFTNGP14.phx.gbl...
"Michael Barrido" <jm***@hotmail.com> schrieb:
Dim binary_data As Byte() = {&HAA, &HD0, &H15, &HB, &H10, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H56}
objPort.Write(SerialNET.Port.ByteArrayToString(bin ary_data))

Now i want to re-use the bytearray variable "binary_data" to store new
values. Something like:

binary_data = {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &HD7}

but it wont compile.
Can you please tell me how i can re-use "binary_data" to store new
values?


\\\
BinaryData = New Byte() {...}
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 8 '05 #5
Thank you very much! it works!
"Armin Zingler" <az*******@freenet.de> wrote in message
news:ev*****************@TK2MSFTNGP15.phx.gbl...
"Michael Barrido" <jm***@hotmail.com> schrieb
Greetings I have the following code:

Dim binary_data As Byte() = {&HAA, &HD0, &H15, &HB, &H10,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H56}
objPort.Write(SerialNET.Port.ByteArrayToString(bin ary_data))

Now i want to re-use the bytearray variable "binary_data" to store
new values. Something like:

binary_data = {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &HD7}

but it wont compile.
Can you please tell me how i can re-use "binary_data" to store new
values? Thanks in advance!


Do you want to use the same array and put the new values in, or due you
want to create a new array containing the new values? To do the latter:

binary_data = new byte() {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &HD7}
Armin

Dec 8 '05 #6
Thank you very much! it works!
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Or******************@TK2MSFTNGP14.phx.gbl...
"Michael Barrido" <jm***@hotmail.com> schrieb:
Dim binary_data As Byte() = {&HAA, &HD0, &H15, &HB, &H10, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H56}
objPort.Write(SerialNET.Port.ByteArrayToString(bin ary_data))

Now i want to re-use the bytearray variable "binary_data" to store new
values. Something like:

binary_data = {&HAA, &HD0, &H15, &HB, &H7F, &H10, &H0, &H0, &H0,
&H0, &H0, &H0, &H0, &H0, &H0, &HD7}

but it wont compile.
Can you please tell me how i can re-use "binary_data" to store new
values?


\\\
BinaryData = New Byte() {...}
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 8 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Craig Bailey | last post by:
Anyone recommend a good script editor for Mac OS X? Just finished a 4-day PHP class in front of a Windows machine, and liked the editor we used. Don't recall the name, but it gave line numbers as...
8
by: Beowulf | last post by:
Hi Guru's, I have a query regarding using PHP to maintain a user profiles list. I want to be able to have a form where users can fill in their profile info (Name, hobbies etc) and attach an...
2
by: sky2070 | last post by:
i have two file with jobapp.html calling jobapp_action.php <HTML> <!-- jobapp.html --> <BODY> <H1>Phop's Bicycles Job Application</H1> <P>Are you looking for an exciting career in the world of...
6
by: Chris Krasnichuk | last post by:
Hello every one, Does anyone know how to make php work on your computer? please reply I need help Chris
2
by: sky2070 | last post by:
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ')' in c:\inetpub\wwwroot\session.php on line 19 can anyone tell me what is wrong with this code??? <? // Define the Session...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.