I just recently upgrade to VS2012 and I'm a little confused reading about the new .NET CF 3.9 so I'm hoping someone here can clear up my confusion.
Back when I was using VS2008 I wrote some software for my company. The software ran on a HP iPAQ PDA and was a data entry software. When VS2010 came out it no longer supported the .NET CF but now I'm reading that VS2012 will support a new version of the CF (3.9) starting Q1 2013. When I search on Microsoft's site though I see links saying "Evaluate Compact 7 for free today." Back when I wrote the iPAQ software everything was free. Visual Studion had a project type for mobile devices and the .NET CF was a free install. Now it looks like to write anything for a mobile device it is an extra fee.
Am I missing something? Is the Compact 7 different then the .NET CF 3.9? Is there any installs to add a mobile device project type to VS2012?
I know it would be easier if my company just upgrade our devices but they don't want to spend the money when the HP iPAQ are still functioning. I would like to update the software on it, I just hate having to work on the PDA software with VS2008 and then the companion desktop application with VS2012.
In the meantime, is there anyway I could currently work on the PDA application with VS2012?
I am trying to merge to byte arrays and can't seem to get my code to work. Code below. Can i get some thoughts on what might be happening? I have verified that the arrays DO have data in them(aka length > 0).
Dim pdfBytesSyllabus AsByte() = pdf.GetPdfBytesFromHtmlStream(streamSyllabus, System.Text.Encoding.ASCII)
Dim pdfBytesCenter AsByte() = pdf.GetPdfBytesFromHtmlStream(streamCenter, System.Text.Encoding.ASCII)
Array.Copy(pdfBytesCenter, 0, pdfBytesSyllabus, pdfBytesSyllabus.Length, pdfBytesCenter.Length)
Array.Copy won't work as it does not resize the destination array (pdfBytesSyllabus) to hold the additional data from pdfBytesCenter.
The steps required are
1) Create a new array of sufficient length to hold both arrays
2) Copy pdfBytesSyllabus to the new array at index 0
3) Copy pdfBytesCenter to the new array at index pdfBytesSyllabus.Length
Much the same thing could be done with a generic List Of Byte, which is really just an implementation of a resizable array with a lot of useful methods added.
As Alan has said, the problem is to do with the fact that the array isn't big enough to contain this. A simple way to fix this is to create a generic list of bytes and add the data into it. You can easily get an array out of this like this:
Dim pdfData AsNew List(Of [Byte])(pdfBytesSyllabus.Length + pdfBytesCenter.Length)
' To get an array, just use
Dim cumulativePdfData AsByte() = pdfData.ToArray()
I was brought up to respect my elders. I don't respect many people nowadays.