473,491 Members | 3,350 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1578
"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
6408
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
4394
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
106585
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
3498
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
51377
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...
20
11624
by: bb | last post by:
I'm not a Perl programmer nor a Linux adherent. What are the advantages of LAMP vs.the Java model for building data-driven websites? I do a fair amount of development using Tomcat/JSP/Servlets...
1
3132
by: Randell D. | last post by:
Folks, I use Apache/PHP with Webazlier to view the log files. I get a number of user agents (web browsers?) that visit the website - For example: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT...
2
3055
by: Nick | last post by:
Im trying to build an array from elements I have stored in a text file (So I can access them on multiple pages). What is the syntax for this? I thought it might be... storedArray1 =...
5
4376
by: Adams-Blake Co. | last post by:
In table is record, field called CompanyName that has: Joe\'s Place (I added the slashes before inserting the field.) This will NOT work: $x="Joe's Place"; $sql="Select * from Company...
3
2495
by: sky2070 | last post by:
<?php Header("Content-Type: image/png"); $im = ImageCreate(100, 100); // Allocate a background color and a drawing color for the image $black = ImageColorAllocate($im, 0, 0, 0); $white =...
0
7157
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
7192
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
5452
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,...
1
4886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.