Solved

Multi Dimensional Array.

Posted on 2006-11-30
7
183 Views
Last Modified: 2010-04-23
Please help me,

I need to create an array or some sort of in-memory storage to:

Store a:    Number of channels(1-20)
           
Each channel can have multiple lines of data.
This data must be split into its relative fields.

Public gSMDRArr As String()()()         '(Ch#)(Line)(Field)

This seems a bit redundant, for example if channel(Ch#) 17 has 3 (Line)s of data each (Line) has (Field)s: "ID,Date,Time,Duration"

Line 1 for CH# 17
gSMDRArr(17)(0)(0) = "453"                       'ID
gSMDRArr(17)(0)(1) = "11/17/06"               'Date
gSMDRArr(17)(0)(2) = "02:38PM"                'Time
gSMDRArr(17)(0)(3) = "00:02:14"               'Duration
Line 2 for CH# 17
gSMDRArr(17)(1)(0) = "453"                       'ID
gSMDRArr(17)(1)(1) = "11/17/06"               'Date
gSMDRArr(17)(1)(2) = "02:40PM"                'Time
gSMDRArr(17)(1)(3) = "00:01:04"               'Duration
Line 3 for CH# 17
gSMDRArr(17)(2)(0) = "453"                       'ID
gSMDRArr(17)(2)(1) = "11/17/06"               'Date
gSMDRArr(17)(2)(2) = "02:42PM"                'Time
gSMDRArr(17)(2)(3) = "00:02:14"               'Duration

Then for channel 4 has 2 lines  then once the last line comes with its termination code i need to clear the channel, all the lines and fields.


I hope i was clear,
Thanks
0
Comment
Question by:ryankahan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 9

Accepted Solution

by:
noulouk earned 500 total points
ID: 18044180
Hi ryankahan,

Why not use a  DataSet ?

As you tell, "This seems a bit redundant".

Hope this  helps.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 18044817
What .NET version do you have?

Bob
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 18046155
I would create a Class to hold the fields, and then use an ArrayList to hold multiple instances of that class...one for each line.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 96

Expert Comment

by:Bob Learned
ID: 18046737
Yeah, Mikey, but 2005 has generics, which is much better than an ArrayList ;)

Bob
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 18048033
True...just depends on what flava we're workin with.  =)

How ya been Bob?...haven't seen as much of ya lately.
0
 

Author Comment

by:ryankahan
ID: 18051719
vb.net 2005.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 18053155
Simplified version:

Public Class Entry

   Public ID As Integer
   Public Date_Time As Date
   Public Duration As TimeSpan

End Class

Public Class Lines

    Public Entries As New List Of(Entry)

End Class

Private m_channels As New List(Of Lines)

Bob
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question