Click here to Skip to main content
15,867,983 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to add item of type image (byte array) in array list how to do
VB
Dim ImageData() As Byte = Nothing
            ImageData = ReadFile("C:\MyDocument\data.zip")


 Dim sArr As New ArrayList
sArr.add("@image",ImageData)


..where readfile return byte array

ASM
but my other all parameters are string and one parameter is byte array which is byte array of one of tthe zip file..as
sArr.add("@image",ImageData)
 sArr.Add("@timecode," & Format(CDate(dtp.Text), "dd-MM-yyyy"))
but it not accepting


is it right

way...
Posted
Updated 6-Mar-12 22:20pm
v3

1 solution

Yes based on your question, this is right.
To get the data back into a byte, use Dim a as byte[] = (byte[])sArr[0].
 
Share this answer
 
Comments
vishal_h 7-Mar-12 4:09am    
but my other all parameters are string and one parameter is byte array which is byte array of one of tthe zip file..as
sArr.add("@image",ImageData)
sArr.Add("@timecode," & Format(CDate(dtp.Text), "dd-MM-yyyy"))
but it not accepting

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900