Recently, I am coding a c# module (previously was written in vb.net), I found that "Collection Class" did NOT exist in c# but it can be found in vb.net !!======================================My Computer: .NetFramework 1.1 & VS.NET 2003======================================And therefore I am forcing myself to use the following methods to solve the "missing class" in c#Step 1. Under the Solution Explorer, Add Reference "Microsoft.VisualBasic"Step 2. Under the *.cs file, Type using Microsoft.VisualBasic;Step 3: Under the *.cs file, Type Collection m_result = new Collection;
In fact, I can NATIVELY use Collection in vb.netDim m_results As New Collection
This is the way I can use Collection in c#. May I ask if any experts here can give me an answer what is the "suitable" way to have Collection? or Am I correct?Here below is one of the functions (written in VB.NET) I use Collection and "grap" the data in the DAL Layer and use it for UI Layer:----------------------------------------------------Public Function GetBrands() As Collection
Dim m_da As New MySqlDataAdapter
Dim m_ds As New DataSet
Dim m_data As m_BrandData
Dim m_results As New Collection
Dim m_dataRow As DataRow
Dim m_SQL As String
m_SQL = "Select * From tb_Brand order by brandName"
m_da.SelectCommand =
m_da.Fill(m_ds, "table1")
m_data =
.brandCode =
.brandName =
m_results.Add(m_data)
GetBrands = m_results