By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,694 Members | 1,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,694 IT Pros & Developers. It's quick & easy.

Array Alternative

P: n/a
Hi,

I am writing an application that reads data from a PLC in a
manufacturing plant.
I use a control to communicate with the PLC, that returns an array of
Short values.

I do not always know the length of the data block that will be returned,
and so cannot declare a suitable array. (As well as that, I believe
re-dimensioning an array in VB.Net is very inefficient)

Can anyone suggest a way of storing this data so it can then be manipulated?
I am using .Net 1.1 and VS 2003
Thankyou.

Paul Cheetham
Feb 10 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Paul Cheetham wrote:
Hi,

I am writing an application that reads data from a PLC in a
manufacturing plant.
I use a control to communicate with the PLC, that returns an array of
Short values.

I do not always know the length of the data block that will be returned,
and so cannot declare a suitable array. (As well as that, I believe
re-dimensioning an array in VB.Net is very inefficient)

Can anyone suggest a way of storing this data so it can then be
manipulated?
I am using .Net 1.1 and VS 2003
Thankyou.

Paul Cheetham

sounds like an arraylist is exactly what you need.
take a look at it. Also some of the collection classes may help.
Chris
Feb 10 '06 #2

P: n/a


declaring the array with the result should work in my opinion

pseudo code :::

Dim shorts() As Short = Returningdata

regards

Michel Posseth [MCP]

"Paul Cheetham" <PA******@dsl.pipex.com> schreef in bericht
news:OK**************@TK2MSFTNGP14.phx.gbl...
Hi,

I am writing an application that reads data from a PLC in a manufacturing
plant.
I use a control to communicate with the PLC, that returns an array of
Short values.

I do not always know the length of the data block that will be returned,
and so cannot declare a suitable array. (As well as that, I believe
re-dimensioning an array in VB.Net is very inefficient)

Can anyone suggest a way of storing this data so it can then be
manipulated?
I am using .Net 1.1 and VS 2003
Thankyou.

Paul Cheetham

Feb 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.