473,327 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Collection Object Preferred

Hello everyone,

Just a general question. Is the Collection Object a dinosaur from VB6 with
another more useful object preferred for VB.NET? Or, has its stature remained
unchanged with .NET?

Thanks in advance!
Jack

Nov 21 '05 #1
6 1017
Hi Jack,

That Collection class is provided for backwards compatibility, but in .NET
it is better to search a more suitable class or build your own derived from
some of the several bases to do that.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"Jack" <Ja**@discussions.microsoft.com> escribió en el mensaje
news:7C**********************************@microsof t.com...
Hello everyone,

Just a general question. Is the Collection Object a dinosaur from VB6 with
another more useful object preferred for VB.NET? Or, has its stature
remained
unchanged with .NET?

Thanks in advance!
Jack

Nov 21 '05 #2
"Jack" <Ja**@discussions.microsoft.com> schrieb:
Just a general question. Is the Collection Object a dinosaur from VB6 with
another more useful object preferred for VB.NET? Or, has its stature
remained
unchanged with .NET?


You can use it whenever it's use is appropriate. However, notice that this
class is not serializable.

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

Nov 21 '05 #3
Jack,

I wished that they had placed this class in the backwards compatibility
namespace however it is still in the normal visual.basic namespace.

The same as all the MS-VB functions uses this the One starting indexer
instead from the Zero starting indexer. Although that Zero starting indexer
is a very good idea, is it nowhere accepted and all other arrays and
collections in .Net use therefore the Zero as start point for the index.

I avoid it because of that, it is very confusing.

Just my thought about it.

Cor
Nov 21 '05 #4
doh,
Although that Zero starting indexer is a very good idea, is it nowhere
accepted and all other arrays and Although that First starting indexer is a
very good ....................................


Cor

Nov 21 '05 #5
Murphys law second time wrong

">>Although that Zero starting indexer is a very good idea, is it nowhere
accepted and all other arrays and


Although that First starting indexer is a very good
.....................................

Cor


Nov 21 '05 #6
Jack,
In addition to the other comments.

The VB.Collection class is a very generalized collection.

While the collection classes in System.Collections &
System.Collections.Specialized are specialized collection classes.

I normally favor type safe collections that inherit from DictionaryBase or
CollectionBase (extremely specialized collections).

The other "problem" with with VB.Collection is as Cor suggests that it uses
base 1 offsets, while all other .NET collections use base 0 offsets, this
can cause subtle "off by 1" bugs in your code.

Hope this helps
Jay

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
Hello everyone,

Just a general question. Is the Collection Object a dinosaur from VB6 with
another more useful object preferred for VB.NET? Or, has its stature
remained
unchanged with .NET?

Thanks in advance!
Jack

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Generic Usenet Account | last post by:
To settle the dispute regarding what happens when an "erase" method is invoked on an STL container (i.e. whether the element is merely removed from the container or whether it also gets deleted in...
14
by: marduk | last post by:
I couldn't think of a good subject.. Basically, say I have a class class Spam: def __init__(self, x): self.x = x then if I create two instances:
6
by: MikeSwann | last post by:
Dear All, I am trying to decide on to create a collection object for a project that I am working on. I am fairly new to OOP so this may be on the basic side. I have looked on the groups, but...
12
by: pamelafluente | last post by:
Hi guys, Is it possible to get the current index, when iterating with FOR EACH on some collection (implementing ILIST) without using and external counting variable (, that is somehow getting...
3
by: Steven Nagy | last post by:
XML serialising this class: public class Table { public List<IActionActions; public List<ColumnColumns; } I think the interface is the problem.
5
by: Nathan Sokalski | last post by:
I was trying to use a code sample from a book I bought (.NET Gotchas by O'Reilly, author = Venkat Subramaniam). The line of code I am trying to use is the following: Dim coll As New...
5
by: Simon Woods | last post by:
Hi Does anyone know if there any dotnet software out there which converts a dataset into a collection of custom objects, programmatically i.e. actually creates the class structure and collection...
2
by: (2b|!2b)==? | last post by:
I am a relatively new to C#. I want to write a method that returns an 'iterable' collection: TheCollection = MyClass.MethodName(); // Further down, I want to use for .. each ...
158
by: pushpakulkar | last post by:
Hi all, Is garbage collection possible in C++. It doesn't come as part of language support. Is there any specific reason for the same due to the way the language is designed. Or it is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.