Results 1 to 3 of 3

Thread: propertyinfo.getvalue

  1. #1

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

    propertyinfo.getvalue

    Hey,

    How can I get the value of a property if i'm in a shared class?
    I can't use Me as the object parameter.

    Thanks,

    MA
    Don't anthropomorphize computers -- they hate it

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: propertyinfo.getvalue

    There's no such thing as a Shared class. You might be in a Shared method of a class or you might be in a module. If you are in a Shared method then there is no current instance so of course you can't use Me, but then you if there's no current instance then you can't get a property value of the current instance via reflection either.

    Are you saying, without actually saying, that you want to get the value of a Shared property of the current type?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

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

    Re: propertyinfo.getvalue

    I'm sorry, i completely miswrote that.
    Yes, that is what I meant, hehe.
    I figured it out.

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

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