Click here to Skip to main content
15,892,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm having a fairly basic problem with Visual Studio.

I'm using Visual C# 2008 Express Edition
I have .net framework 3.5


I have no access to HashSet<t> class.

It's in System.Collections.Generic, which is included in System.Core.

I have included a reference to System.Core in my project, and I have included Systems.Collections.Generic in my class.

I have all of the System.Collections.Generic classes EXCEPT HashSet.

Anyone have any possible problems?
Posted
Comments
OriginalGriff 27-Jun-10 3:56am    
Check the framework version again - if you are not using V3.5 then it will not be available. If you created a new 3.5 project it should be there. Go to the menu: "Project"..."Your name Properties" and the "Target framework" should be on the left.
JedJackoway 27-Jun-10 4:02am    
I do not have "Target Framework" as an option. I think something is wrong with my solution file, I am going to try switching to Visual Studio 2010 and see if this fixes the problem.

1 solution

I don\'t use Express, but it was introduced at .NET 3.5 so you should have it.
Try this:
1) Create a new project as part of your solution - make it a Console App, for simplicity, and ensure it is .NET framework version 3.5 (this is all on the add project dialog screen)
2) In your Main method, start a new line, and type Hash.

Does intellisense list HashSet<>?

Complete the line as:
HashSet<string> hs = new HashSet<string>();


Does the syntax color change for HashSet?
If not, right click the word HashSet - do you have an option \"Resolve\"? If so, what happens with the various options?

Respond either by editing your original question, or by commenting on this answer - do not use the add answer button!
 
Share this answer
 
Comments
JedJackoway 27-Jun-10 3:52am    
None of that happens. Both the intellisense and the actual compiler totally fail to recognize the Class. I've even tried reinstalling Visual Studio...I am quite confused!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900