Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding reference to System.Collections

Status
Not open for further replies.

stormbind

Technical User
Mar 6, 2003
1,165
0
0
GB
In Visual Studio,

I right click References and select Add Reference..
I browse list of .NET Components and..
System.Collections is not in the list!

How do I add this to the addable components?

Thanks,

--Glen :)

Memoria mihi benigna erit qui eam perscribam
 
From what I understand, System.Collections is part of the framework. All you have to do is put in a using statement.

using System.Collections;

and you're ready to go.

 
Yeah but Visual Studio persisted in underlining HashTable.
This didn't work:
Code:
using System.Collections;
.
.
HashTable a = new HashTable();
This did work:
Code:
Hashtable a = new System.Collections.Hashtable();
*shrug* nevermind :)

--Glen :)

Memoria mihi benigna erit qui eam perscribam
 
Keep in mind that C# is case sensative. So

Code:
HashTable a = new HashTable();

is not the same as

Code:
Hashtable a = new Hashtable();

HTH

Chew

10% of your life is what happens to you. 90% of your life is how you deal with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top