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

array of structures question

P: n/a
Hi
I need help with a code snippet for the following
problem.

1. I have 2 elements , one is a datetime element and another is an integer
2. I would like to store this in a array so that for each index of the array
I can refer to the integer value or the datetime value.

I think I need some kind of structure that a 1 dimensional array can point
to
and this structure that contains the 2 data types

How can I declare this and access this structure?
Allan
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Aprivate,

Nice puzzle.

Can you make it more clear, what is the integer?

Cor
Nov 21 '05 #2

P: n/a
"aprivate" <al***@singaporerc.com> schrieb:
1. I have 2 elements , one is a datetime element and another is an integer
2. I would like to store this in a array so that for each index of the
array
I can refer to the integer value or the datetime value.

I think I need some kind of structure that a 1 dimensional array can point
to
and this structure that contains the 2 data types

How can I declare this and access this structure?


\\\
Public Structure Item
Public StartDate As Date
Public Number As Integer
End Structure
..
..
..
Dim Items(10) As Item
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
Hi
Thanks
This is what I need..!

Regds
Allan
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O%****************@TK2MSFTNGP12.phx.gbl...
"aprivate" <al***@singaporerc.com> schrieb:
1. I have 2 elements , one is a datetime element and another is an
integer
2. I would like to store this in a array so that for each index of the
array
I can refer to the integer value or the datetime value.

I think I need some kind of structure that a 1 dimensional array can
point to
and this structure that contains the 2 data types

How can I declare this and access this structure?


\\\
Public Structure Item
Public StartDate As Date
Public Number As Integer
End Structure
.
.
.
Dim Items(10) As Item
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.