PC Review


Reply
Thread Tools Rate Thread

How to access object in array by property value?

 
 
Katit
Guest
Posts: n/a
 
      23rd Jun 2006
Is it possible to find object in array with specific property value?
Just like dataset filter?

Thanks!

 
Reply With Quote
 
 
 
 
clintonG
Guest
Posts: n/a
 
      24th Jun 2006
So you want to determine the type of an object in an array and query its
properties? Use nested foreach statements (branching logic) starting with an
outer branch using the GetType method. When the outer branch finds the type
you are looking for, a nested foreach branch finds the property unique to
the type. Using foreach does all the magic with the indexer of the array
while other methods could require writing more code. Finally, foreach is an
efficient way to step through an array.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/


"Katit" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is it possible to find object in array with specific property value?
> Just like dataset filter?
>
> Thanks!
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I access to property of chart object ? =?Utf-8?B?SFAuIEp1bmc=?= Microsoft Excel Charting 0 11th Apr 2007 02:36 PM
Access Object Version Property Usman Microsoft Access 0 6th Feb 2007 11:39 AM
Using property to access elements of array? pinetaj Microsoft C# .NET 6 18th Jan 2006 12:37 AM
How to load an object's property which is an array list? Derek Martin Microsoft VB .NET 1 2nd Apr 2004 07:00 PM
Access to Session Object Property Dorsa Microsoft VB .NET 1 18th Dec 2003 07:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:37 PM.