Results 1 to 4 of 4

Thread: Name of a property

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Name of a property

    Hey,

    How can I obtain the name of a property programmatically?

    For example Class1.SomeProperty.

    I want to get the SomeProperty as string programmatically.


    Thanks,
    Don't anthropomorphize computers -- they hate it

  2. #2
    Lively Member
    Join Date
    Oct 2005
    Posts
    115

    Re: Name of a property

    all public properties of your class are available to all other class to which it is called. and yes, they are available programmatically.
    unless i am mistaken on what exactly it is that you want

  3. #3

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Re: Name of a property

    No, when you call the property like so object.someproperty, it will return the result of the get method of the property.

    What I want is the following.
    I have a class with shared properties.
    I want to get the ACTUAL name of the property programmatically, not the value.

    dim s as string = class.someproperty

    But I don't want the result of get, I want the actual property name, in this case someproperty.

    Hopefully this is explains it better.

    Thanks,
    Don't anthropomorphize computers -- they hate it

  4. #4
    Addicted Member
    Join Date
    Jan 2005
    Location
    Quagmire of programming
    Posts
    165

    Re: Name of a property

    Read through this post. I do believe you will find what you are looking for.

    Kyjan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width