By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,441 Members | 1,281 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,441 IT Pros & Developers. It's quick & easy.

Accessing Class Properties

P: n/a
I have a VB.NET class with a number of properties and would like to be able
to reference them in an index fashion. Is this possible and if so, how would
I set this up?

Psuedo code
xyz = MyClass("PropertyName").Value

Joel Reinford
Data Management Solutions LLC
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* "Joel Reinford" <jr********@earthlink.net> scripsit:
I have a VB.NET class with a number of properties and would like to be able
to reference them in an index fashion. Is this possible and if so, how would
I set this up?

Psuedo code
xyz = MyClass("PropertyName").Value


'CallByName'...

.... or Reflection, but that's more complicated.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

P: n/a
Can you give an example using Reflection?

Joel

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uY**************@TK2MSFTNGP11.phx.gbl...
* "Joel Reinford" <jr********@earthlink.net> scripsit:
I have a VB.NET class with a number of properties and would like to be able to reference them in an index fashion. Is this possible and if so, how would I set this up?

Psuedo code
xyz = MyClass("PropertyName").Value


'CallByName'...

... or Reflection, but that's more complicated.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3

P: n/a
"Joel Reinford" <jr********@earthlink.net> schrieb
Can you give an example using Reflection?

Reflection overview:
http://msdn.microsoft.com/library/en...natruntime.asp

example:
http://msdn.microsoft.com/library/en...usingtypes.asp
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.