PC Review


Reply
Thread Tools Rate Thread

Collection Object Preferred

 
 
=?Utf-8?B?SmFjaw==?=
Guest
Posts: n/a
 
      15th Mar 2005
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

 
Reply With Quote
 
 
 
 
Carlos J. Quintero [.NET MVP]
Guest
Posts: n/a
 
      15th Mar 2005
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" <(E-Mail Removed)> escribió en el mensaje
news:7C3FE69A-775B-4FE4-B218-(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      15th Mar 2005
"Jack" <(E-Mail Removed)> 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/>

 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      15th Mar 2005
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


 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      15th Mar 2005
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



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      15th Mar 2005
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




 
Reply With Quote
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      15th Mar 2005
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" <(E-Mail Removed)> wrote in message
news:7C3FE69A-775B-4FE4-B218-(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding class object to collection repeats same object through collection? Erazmus Microsoft Excel Programming 2 17th Sep 2007 04:35 AM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Øyvind Isaksen Microsoft ASP .NET 1 18th May 2007 10:24 AM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Øyvind Isaksen Microsoft Dot NET 1 18th May 2007 10:24 AM
collection object not showing properties of stored object? =?Utf-8?B?UmljaA==?= Microsoft VB .NET 5 8th Nov 2006 05:51 PM
To store object and access by key(string), what collection object is the best performance one? Thanks. david Microsoft C# .NET 1 12th Dec 2003 03:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:50 PM.