Click here to Skip to main content
16,014,392 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: unique values Pin
Paul Conrad19-Jul-07 6:55
professionalPaul Conrad19-Jul-07 6:55 
GeneralRe: unique values Pin
n_gchaitra19-Jul-07 18:37
n_gchaitra19-Jul-07 18:37 
GeneralRe: unique values Pin
Paul Conrad19-Jul-07 18:40
professionalPaul Conrad19-Jul-07 18:40 
GeneralRe: unique values Pin
Psycho-*Coder*-Extreme21-Jul-07 18:55
Psycho-*Coder*-Extreme21-Jul-07 18:55 
AnswerRe: unique values Pin
Pete O'Hanlon20-Jul-07 4:43
mvePete O'Hanlon20-Jul-07 4:43 
GeneralRe: unique values Pin
Paul Conrad21-Jul-07 18:34
professionalPaul Conrad21-Jul-07 18:34 
AnswerRe: unique values Pin
Urs Enzler22-Jul-07 6:34
Urs Enzler22-Jul-07 6:34 
QuestionUsing Reflection to iterate through a collection object? Pin
twista17-Jul-07 23:01
twista17-Jul-07 23:01 
Hi,

I've been trying to work out how to iterate through a collection object using reflection.

I have a class with a few simple objects, strings, single[] arrays, and one collection.

However, when I'm using the GetFields() method to retrieve the objects in my class, when it gets to the collection I am unable to view all the items in the collection.

dim coll as collection = FieldInfoObj.getvalue(obj)
console.writeline("Collection has " & coll.count & " items in the collection")
for each item as object in coll
do_stuff(item)
next

Although it correctly states that I have 4 items in the collection, item 1 is Ok. item 2 is 'nothing' and item 3 causes an error. But I do actually have 4 'singles' in the collection.

How do i access the collection objects using reflection?

I *think* I need to reflect into each object seperately, and not just iterate through them after setting the main collection object using the getvalue(obj) method as I would with the other system.xxx type objects (which work fine)

Could anyone provide a simple example of how to iterate through a collection using reflection?

Thanks in advance,
Phil.
AnswerRe: Using Reflection to iterate through a collection object? Pin
Urs Enzler22-Jul-07 22:29
Urs Enzler22-Jul-07 22:29 
GeneralRe: Using Reflection to iterate through a collection object? Pin
twista25-Jul-07 23:55
twista25-Jul-07 23:55 
Question.Net 3.0 installation always fail Pin
George_George16-Jul-07 21:49
George_George16-Jul-07 21:49 
AnswerRe: .Net 3.0 installation always fail Pin
Akhilesh Yadav17-Jul-07 0:09
Akhilesh Yadav17-Jul-07 0:09 
GeneralRe: .Net 3.0 installation always fail Pin
George_George17-Jul-07 0:42
George_George17-Jul-07 0:42 
AnswerRe: .Net 3.0 installation always fail Pin
Kevin McFarlane17-Jul-07 0:25
Kevin McFarlane17-Jul-07 0:25 
GeneralRe: .Net 3.0 installation always fail Pin
George_George17-Jul-07 0:37
George_George17-Jul-07 0:37 
GeneralRe: .Net 3.0 installation always fail Pin
Kevin McFarlane17-Jul-07 1:38
Kevin McFarlane17-Jul-07 1:38 
GeneralRe: .Net 3.0 installation always fail Pin
George_George17-Jul-07 2:28
George_George17-Jul-07 2:28 
GeneralRe: .Net 3.0 installation always fail Pin
Kevin McFarlane17-Jul-07 2:38
Kevin McFarlane17-Jul-07 2:38 
GeneralRe: .Net 3.0 installation always fail Pin
George_George17-Jul-07 3:11
George_George17-Jul-07 3:11 
GeneralRe: .Net 3.0 installation always fail Pin
Kevin McFarlane17-Jul-07 3:24
Kevin McFarlane17-Jul-07 3:24 
GeneralRe: .Net 3.0 installation always fail Pin
George_George17-Jul-07 3:44
George_George17-Jul-07 3:44 
QuestionWhere is .Net 2.0 configuration? Pin
Richard Jones16-Jul-07 4:46
Richard Jones16-Jul-07 4:46 
AnswerRe: Where is .Net 2.0 configuration? Pin
martin_hughes16-Jul-07 5:30
martin_hughes16-Jul-07 5:30 
GeneralRe: Where is .Net 2.0 configuration? Pin
Richard Jones16-Jul-07 6:07
Richard Jones16-Jul-07 6:07 
GeneralRe: Where is .Net 2.0 configuration? Pin
martin_hughes16-Jul-07 6:17
martin_hughes16-Jul-07 6:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.