Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Collection only in VB

Why is the Collection in the Microsoft.VisualBasic library? Why is it not in a more general location. Is there a reason Microsoft "hid" it from C#?

like image 530
poy Avatar asked May 31 '12 19:05

poy


1 Answers

The Collection in the Microsoft.VisualBasic library is a throw-back to the older VB6 Collection.

There is a System.Collection namespace that you should probably look into for the basic .NET collection functionality you probably want.

Also, it's kind of worth mentioning that you CAN add a reference and make use of the System.VisualBasic namespace in your C# code. It's just that, most of the time, there isn't any need to do it (example: http://msdn.microsoft.com/en-us/library/ms173136.aspx).

EDIT - Updated namespace - sorry!

like image 105
Rob P. Avatar answered Oct 08 '22 11:10

Rob P.