Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

ReDim Preserve


  • Please log in to reply
5 replies to this topic

#1 Bryan T

Bryan T

    Member

  • Members
  • PipPip
  • 25 posts

Posted 25 April 2012 - 04:28 PM

I am trying to move some existing VB code to Netduino. The code uses "ReDim Preserve" to resize existing byte arrays. On compile, it throws errors saying that "Microsoft.VisualBasic.CompilerServices.Utils.CopyArray" is not defined. Does anyone know of any options I have to get around this?

#2 Bainesbunch

Bainesbunch

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationFrance

Posted 25 April 2012 - 04:53 PM

Unfortunately at the moment there is ,as it says, no array copy functionality built in. What you have to do is create a second array the size you are trying to redim and copy one by one the values from you original array :o Cheers Pete.
I was going to change the world, then I discovered Netduino.
The world will have to wait.

#3 Bryan T

Bryan T

    Member

  • Members
  • PipPip
  • 25 posts

Posted 25 April 2012 - 05:45 PM

Yeah, I was kind of afraid of that. :o Thanks for the reply.

#4 Bryan T

Bryan T

    Member

  • Members
  • PipPip
  • 25 posts

Posted 25 April 2012 - 06:18 PM

Is there a list somewhere of what is and is not included in the .net micro framework, as it relates to Netduino development?

#5 emg

emg

    Advanced Member

  • Members
  • PipPipPip
  • 129 posts

Posted 25 April 2012 - 08:51 PM

Not really, I wish there was. Additionally, if using VB, there are some differences between C# and VB - with some functionality not implemented in VB (System.Convert.ToUInt64, Decimal and others). Nothing like making you feel unwanted...

You can get a general idea of what's available from: API Reference for .NET Micro Framework Not much detail. And just to add to your confusion, it's not all implemented on the Netduino. Best to ask here if you have specific questions...

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 April 2012 - 07:20 AM

The .NET Micro Framework uses the VB Core compilation mode for .NET MF. Here are some more details on VB Core: http://blogs.msdn.co...o-2010-sp1.aspx Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.