|
by: Duncan Bayne |
last post by:
Hi All,
Be careful when indexing Hashtable elements by number. The following
code will create two quite distinct entries in an Hashtable:
myHashtable.Add((int)666, "Foo");
myHashtable.Add((long)666, "Foo");
Always ensure all indexing is done by the objects of the same type -
it's probably safest to explicitly cast them.
|
by: Matt C. |
last post by:
I bet I know the answer already.
I have a hashtable (hMaster) that holds several hashtables ("hTables") each
of which holds other hashtables ("hColumns"). Presently, I am getting at
the info I want thusly (this compiles, at least):
Hashtable hTable = (Hashtable)hMaster;
Hashtable hColumn = (Hashtable)hTable;
return...
|
by: Crirus |
last post by:
Easyest and fastest way... :)
--
Ceers,
Crirus
------------------------------
If work were a good thing, the boss would take it all from you
------------------------------
|
by: Marty |
last post by:
Hi,
Is there a way when using a hashtable in VB.NET to add value of a
specific type and retrieve that same value without having to cast it to
the original type?
Thanks
Marty
|
by: Ray Cassick \(Home\) |
last post by:
I have a hashtable in a class that contains key (strings) value (integers,
strings, longs, etc...) data pairs.
I want to move the data to another (different) class instance for
processing.
The key is that I want to make sure I don't rely on the first class to stay
around so I want to make sure that when I move (copy) the data from one...
|
|
by: Anders Borum |
last post by:
Hello!
I am using Hashtables to cache data in services and am looking at generics
for typed access (I control the key/value types). However, I was surprised
to see that the Dictionary throws a KeyNotFoundException if you try to
reference missing keys, which is a change from the Hashtable.
So what?
Well, the idea of a cache is to ensure...
|
by: Mark Rae |
last post by:
Hi,
In v1.x, I used to use the following code to create a case-insensitive
Hashtable:
Hashtable MyHashtable = new
Hashtable(CaseInsensitiveHashCodeProvider.Default,
CaseInsensitiveComparer.Default);
In v2, this generates the following warnings:
|
by: Martin Pöpping |
last post by:
Hello,
I´ve implemented a Hashtable with Int-Keys and Double Values.
Now I want to get the i-th Int-Key of my hashtable.
How do I do that?
I tried it like that:
ICollection intKeys = myHashtable.Keys;
|
by: chrisben |
last post by:
Hi,
Here is the scenario. I have a list of IDs and there are multiple threads
trying to add/remove/read from this list. I can do in C#
1. create Hashtable hList = Hashtable.Synchronized(new Hashtable());
2. create ArrayList aList = ArrayList.Synchronized(new ArrayList());
3. create a string sList = "";
For 1 and 2, since the list is...
|
by: raylopez99 |
last post by:
Hello all—
I’m trying to get the below to work and cannot get the format right.
It’s from this example: http://msdn.microsoft.com/en-us/library/8627sbea(VS.71).aspx
What it is: I’m trying to store multicast delegates in a hash table,
and then fire the delegates one of two ways (after registering/
creating the delegates, etc).
|
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...
|
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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...
|
|
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: 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...
|