Solved

VB software:  old school new school

Posted on 2013-11-13
2
245 Views
Last Modified: 2013-11-14
A number of years ago I used collections .add  . remove  .count to keep track of data.

My understanding is that collections are old school, what is the new way of inputting large amounts of data (objects)  and keeping track of each item, either adding, updating, or deleting items?
0
Comment
Question by:brianpowell
[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
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 39646623
I would not say collections are "old school". They're still very useful objects in your programming arsenal, but .NET certainly has moved the marker forward in that area. Many use the List class, which allows you to store a "list" of objects. It's used like this:

Dim obj as List (Of String)

The "Of String" could be anything, like "Of clsInvoice", if I needed a list of my "clsInvoice" objects. It's fairly simple to use a List:

Dim Customers As List(Of String)

Customers.Add("Bob")
Customers.Add("Sue")
Customers.Add("Sam")

Here's the MSDN page that defines all the Properties, Methods, etc of the List:

http://msdn.microsoft.com/en-us/library/6sh2ey19(v=vs.110).aspx
0
 
LVL 10

Assisted Solution

by:joriszwaenepoel
joriszwaenepoel earned 250 total points
ID: 39647239
It depends on the scenario, sometimes a classic collection is still a good choice. But in a lot of cases there is a better alternative in the Generic collections:

http://msdn.microsoft.com/en-us/library/ms172192(v=vs.110).aspx

For example there is:
- List
- Queue
- Stack
- Dictionary
- SortedList
- SortedDictionary
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

751 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