|
by: Ton van den Heuvel |
last post by:
Hi,
I just noticed that ArrayList.Contains(Object obj) uses the Equals
method of the object that is passed to the Contains method to check
for equality with the object in the list. Wouldn't it be more logical
to use the Equals method of the objects in the list?
Regards,
Ton van den Heuvel
|
by: thechaosengine |
last post by:
Hi all,
Can anyone tell me how ArrayList.Contains works.
The docs say that it tells you if an *object* is contained in the list. Now,
by object do the docs mean the exact instance that you pass in, or some other
way of working?
I have a situation whereby i have a custom collection extended from an ArrayList,
and I would like to be able to find out if a collection contains an instance
|
by: C Downey |
last post by:
Hello:
I have an arraylist storing some very basic objects.
The object is very basic, it has 2 properties : ID, and COUNT
Before I add an object to the arraylist, I want to check if an object with
that same ID already exists in the arraylist.
If it does, I would like to increase the count of the matching object inside
|
by: Dean Slindee |
last post by:
I have loaded two forms into an ArrayList with the following statement:
arrForm.Add(Me) 'in each form's Load method.
Now I want to reference a form in the ArrayList. However, I must not be
using the .Contains Method properly, because the If clause is never true.
Dim frm As frmMain
If arrForm.Contains(frm) Then
|
by: Derek Martin |
last post by:
Hi there, I have been playing with sorting my arraylist and having some
troubles. Maybe just going about it wrong. My arraylist contains objects
and one of the members of the object is 'name.' I would like to sort the
arraylist based on object.name - is that possible?
Thanks!
Derek
|
|
by: HarvSather |
last post by:
C# VS2005
I have a class with 5 properties
I am adding instances this class to an ArrayList
I want to test to see if an instance is already in the ArrayList before
attempting to add the item
From my reading, it seems that I have to have an Equals method in my class
|
by: Robert Hooker |
last post by:
We are moving to .NET2.0 - and have noticed that .Contains() seems to be
around 20% slower under NET2, compared to NET1.1.
This code shows the issue:
static void Main(string args)
{
System.Collections.ArrayList list = new System.Collections.ArrayList();
//Setup 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: 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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: 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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
|
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...
|