473,396 Members | 1,784 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,396 software developers and data experts.

Generic Lists

HI all,

If I have a generic list of values. How do I find values in that list

Thanks
RObert
Jul 17 '06 #1
2 997
Robert Bravery wrote:
HI all,

If I have a generic list of values. How do I find values in that list

Thanks
RObert
Hi Robert,

You can use the 'Contains' method of the List object to test if a value is
contained within the list, is this what you're after?

--
Hope this helps,
Tom Spink

Google first, ask later.
Jul 17 '06 #2
Thanks Tom,
Works like a charm

Robert

"Tom Spink" <ts****@gmail.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Robert Bravery wrote:
HI all,

If I have a generic list of values. How do I find values in that list

Thanks
RObert

Hi Robert,

You can use the 'Contains' method of the List object to test if a value is
contained within the list, is this what you're after?

--
Hope this helps,
Tom Spink

Google first, ask later.

Jul 17 '06 #3

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

Similar topics

11
by: ZenRhapsody | last post by:
Has anyone done any performance testing between new generic Lists and single dimensional arrays? I really like the code flexibility the List provides since I don't know how many items I will...
2
by: Greg Buchholz | last post by:
/* I've been experimenting with some generic/polytypic programs, and I've stumbled on to a problem that I can't quite figure out. In the program below, I'm trying to define a generic version of...
0
by: Wiktor Zychla [C# MVP] | last post by:
We do have generic classes, methods and delegates. My question is: what reason prevents us from having generic properties and indexers? // impossible public List<T> GetList<T> { get { ... }
5
by: Andrew Ducker | last post by:
I have something I'm trying to make work with generics, and it seems like it should, but I can't quite get there. I have a subclass of List<Tthat I want to populate automatically. Each different...
3
by: Seth Gecko | last post by:
Hi I am working with generic lists of various objects and a control dealing with these lists. For instance: A parent form holds: dim Walls as List(Of wall) dim Segments as List(Of segment) ...
1
by: Suds | last post by:
Hi, I'm having an issue with invoking a Generic method that takes Generic Arguments. My method signature is public void GenericMethodWithGenericArguments<E, V>(List<EtheFirstList,...
1
by: Jeff | last post by:
..NET 2.0 Is generic lists faster then tradional lists when sending over a collection of objects (value by reference) in .NET remoting. Lets say if a list of object should be sent from a...
0
by: jappenzeller | last post by:
I've got a coding standard question for generic lists and .NET 2.0. I have created some custom strongly typed lists like, MyClassList:List<MyClass>. We did this because we wanted to reuse some...
2
by: ADN | last post by:
Hi, I have a method which calls my service factory: class person { public int ID { get; set: } public string Name {get; set;} } IList<Personmypeople = __serviceFactory.Fetch(new Person())
6
by: phancey | last post by:
I want to define a class like this class MyClass { List<TMyList<Twhere T : IMyList {get; set;} } or something like this. I don't want to put <Ton my class definition
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
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...
0
tracyyun
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...

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.