Custom Property

G

Guest

I'm trying to create a class and with in that class i want to access or
change the property statement by using "For" or "For each..." statement... is
this possible?

Please point me to the right direction if it is possible.

Please advice.


Thanks in advance.


Ros
 
M

Mattias Sjögren

I'm trying to create a class and with in that class i want to access or
change the property statement

Which property statement? Can you post the code you have so far?

by using "For" or "For each..." statement... is
this possible?

If the property returns something that can be iterated over you can do
that, yes.


Mattias
 
G

Guest

not the property itself...

i ment each individual property in a class... i looked at CollectionBase
Class, but i was not sure if it would return the property... write the
following statements

for each property in MyCollection
'rest of the codes here
next
 
M

Mattias Sjögren

i ment each individual property in a class... i looked at CollectionBase
Class, but i was not sure if it would return the property... write the
following statements

for each property in MyCollection
'rest of the codes here
next


I'm still not sure I fully understand what you're trying to do, but I
think you may be looking for reflection.

For Each pi As PropertyInfo In GetType().GetProperties()



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top