PC Review


Reply
Thread Tools Rate Thread

Accessing Class Properties

 
 
Joel Reinford
Guest
Posts: n/a
 
      22nd May 2004
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


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      22nd May 2004
* "Joel Reinford" <(E-Mail Removed)> 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/>
 
Reply With Quote
 
Joel Reinford
Guest
Posts: n/a
 
      22nd May 2004
Can you give an example using Reflection?

Joel

"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> * "Joel Reinford" <(E-Mail Removed)> 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/>



 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      22nd May 2004
"Joel Reinford" <(E-Mail Removed)> 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

 
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
Accessing class properties with dynamic name Amy Blankenship Microsoft Access Form Coding 0 5th Dec 2007 08:51 PM
Accessing Shared Properties of a Parent Windows App from Class Lib =?Utf-8?B?Sm9uIEViZXJzb2xl?= Microsoft Dot NET Framework 3 6th Nov 2006 07:32 AM
Problem accessing Properties of class, not sure if class =?Utf-8?B?TWljcm9Nb3Ro?= Microsoft C# .NET 3 27th Jul 2006 02:23 PM
Accessing Ignored Class Properties during ItemDataBound =?Utf-8?B?VEI=?= Microsoft Dot NET 0 5th Oct 2005 09:11 PM
Accessing 'nested' class properties John Dann Microsoft VB .NET 1 1st Jun 2005 01:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:15 PM.