|
by: JezB |
last post by:
I have a hashtable (h) of class objects keyed by a string (k) - the class
(c) object stored in each hastable entry has two attributes (a1 and a2).
I want to iterate through the entries of the hashtable by ordering by one of
the attributes of the class (a1 or a2).
How can this easily be achieved ? I think I have to copy to an ArrayList
then write an IComparer - but I'm not sure if this is the best way.
Any advice appreciated.
|
by: Sreekanth |
last post by:
Hello,
Is there any better collection than HashTable in terms of performance, when
the type of the key is integer?
Regards,
Sreekanth.
|
by: vertigo |
last post by:
Hello
I defined:
Hashtable chan1 = new Hashtable(new
CaseInsensitiveHashCodeProvider(CultureInfo.InvariantCulture), new
InvariantComparer());
where:
public class InvariantComparer : IComparer
{
|
by: max sharma |
last post by:
Hi all,
I am using a hashtable for my application. Its similar to word count
application. How can I sort the hashtable w.r.t.
the VALUE and not the KEY. The sample data of the table is given below
which is sorted according the URL as in Dictionary:
www.webroot.com (11)
www.webshots.com (1)
www.weddingprints.com (4)
here, Key = URL (e.g. www.webroot.com)
|
by: PAzevedo |
last post by:
I have this Hashtable of Hashtables, and I'm accessing this object from
multiple threads, now the Hashtable object is thread safe for reading,
but not for writing, so I lock the object every time I need to write to
it, but now it occurred to me that maybe I could just lock one of the
Hashtables inside without locking the entire object, but then I thought
maybe some thread could instruct the outside Hashtable to remove an
inside Hashtable...
|
|
by: =?Utf-8?B?VG9t?= |
last post by:
Cannot not seem to make any sense of the order that my key/values end up in
when added to the Hashtable...ideally, I would like to be able to sort the
keys/values...but not thinking it is possible.
For those who are sure going to ask why I am asking this....I use the
Hashtable for conveniently cross-referencing pairs of information...and I am
now trying to populate a combo box based on the hashtable contents using the
key as the combo...
|
by: chuckroc76 |
last post by:
I am running into an issue with a HashTable where it isnt holding data in the order that I am adding it. I am pulling a SqlDataReader out of a table and looping through that to add the items to the HashTable. I have an ID field (autonumber) and a Sort Index field. I want the items to be stored in the hashtable by Sort Index. However, when I add the items into the hashtable they are getting all messed up. For example, when I have the following...
|
by: almurph |
last post by:
H ieveryone,
Can you help me please? I am trying to sort a hashtable but get the
error: "Cannot implicity convert type void to
System.Collections.ArrayList"
I am doing the following:
****BEGIN CODE****
|
by: almurph |
last post by:
H ieveryone,
Can you help me please? I am trying to sort a hashtable but get the
error: "Cannot implicity convert type void to
System.Collections.ArrayList"
I am doing the following:
****BEGIN CODE****
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|