473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

HashSet in csharp

is there a comparable class to HashSet (java's) in csharp?

Thanks
Sep 29 '08 #1
2 7121
On Mon, 29 Sep 2008 11:36:59 -0700, puzzlecracker <ir*********@gmail.com>
wrote:
is there a comparable class to HashSet (java's) in csharp?
It depends on what exactly from HashSet you're relying on. But yes,
classes such as Hashtable and Dictionary serve the same basic need as
HashSet does. There's even a SortedDictionary, if you need for your
hashed elements to be ordered.

Pete
Sep 29 '08 #2
puzzlecracker wrote:
is there a comparable class to HashSet (java's) in csharp?
There is in .NET 3.5, and it's called... Well, I won't spoil it.

http://msdn.microsoft.com/library/bb359438

Before that, any of the alternatives mentioned by Peter would do. I've
usually used Dictionaries with a dummy value, or Dictionaries where the keys
were the values, depending on what was more convenient. This is not as
efficient as a specialized collection, but it suffices in most cases.

--
J.
Sep 29 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jonathan Grobe | last post by:
From: Nigel Perry <nigel@cosc.canterbury.ac.nz> Newsgroups: news.announce.newgroups,news.groups Subject: RFD: comp.std.csharp Date: Tue, 08 Jul 2003 00:26:01 +0000 REQUEST FOR DISCUSSION (RFD)...
7
by: Eric Gunnerson | last post by:
If you would like to see this group created, please reply to this post, making sure you leave news.groups on the newsgroups line. "Nigel Perry" <nigel@cosc.canterbury.ac.nz> wrote in message...
4
by: light_wt | last post by:
Hi I am taking the 2555 class and a lot of the material is over my head. I don't like the MS's book because there is no step-by-step on interacting with the VS.NET Is there good free resource...
2
by: anand | last post by:
Hi All, Are ownerdraw buttons supported in C# ? I have an active X control which I would like to use in CSharp. Buttons have a style BS_OWNERDRAW, and to do custom drawing you have to...
7
by: Peter Smirnov | last post by:
Sorry for this newbie question but as far as I heard one need at least VisualStudio to develop CSharp applications. Is this correct? Are there otherwise some command line tools like javac.exe and...
2
by: news.microsoft.com | last post by:
Hi: I work in Csharp's parser files by LEX/YACC.Now I have only CSharp-lex.l and CSharp.y file,but they not have CSharp'comment Parse. this is a part of CSharp-lex.l. ........................
2
by: Karl | last post by:
Hi all, I'm reasonably new to csharp so you have to forgive me asking what may be a stupid question... As I said, I'm new to CSharp but in VB I was able to click anywhere on a DataGridView...
5
by: BaronB | last post by:
Hi all, I'm writing a program to solve sliding block puzzles like these and while I think I've more or less figured it out, I have one problem before I start coding it. During execution, the...
8
mickey0
by: mickey0 | last post by:
Hello, I'm new to java and my problem is this: class Word { private String _value; public Word(String value) { _value = new String(value); } } //main
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.