1.First, add a reference to Microsoft.VisualBasic to your project. You can find the Microsoft.VisualBasic in the list on the .Net tab when you open the Add reference dialog.
2.At the top of your code, where the using directives are, you add the following line of code:
using Microsoft.VisualBasic;
3.Now you can use the Collections object.
private void test()
{
Collection col = new Collection();
col.Add("first", "key1", null, null);
col.Add("second", "key2", null, null);
col.Add("third" , "key3", null, null);
foreach (string test in col)
{
Console.WriteLine(test);
}
}
全站熱搜
留言列表