|
-
Mar 2nd, 2003, 09:15 AM
#1
Thread Starter
New Member
Concatenating two arrays
Is there a function in VB.NET which will concatenate two arrays?
Currently, I am using this function:
VB Code:
Private Function AppendArray(ByVal BaseArray() As Byte, ByVal Buffer() As Byte) As Byte()
If IsArray(BaseArray) = False Then
ReDim BaseArray(Buffer.Length - 1)
Buffer.CopyTo(BaseArray, 0)
Else
ReDim Preserve BaseArray(BaseArray.Length + (Buffer.Length - 1))
Buffer.CopyTo(BaseArray, BaseArray.Length - Buffer.Length)
End If
Return BaseArray
End Function
-
Mar 2nd, 2003, 12:16 PM
#2
Sleep mode
Do you mean the function inside String Class ??
-
Mar 2nd, 2003, 12:30 PM
#3
Junior Member
Is there a function in VB.NET which will concatenate two arrays?
Obviously not.
-
Mar 2nd, 2003, 12:36 PM
#4
Sleep mode
There is overloaded function that accepts arrays of strings.
-
Mar 2nd, 2003, 01:27 PM
#5
Junior Member
Extract from MSDN:
If either of the arguments is an array reference, the method concatenates a string representing that array, instead of its members (for example, "System.String[]").
It doesn't join the indices per se, but the types; so my result is "System.Byte[] System.Byte[]".
Also, after running timers on my function, I'm not much worse off using the above method. The times returned vary between 0 and 0.015625; which isn't bad.
Thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|