CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Static members

  1. #1
    Join Date
    Aug 2009
    Posts
    78

    Static members

    Hey
    I have a class ,and have static string member in it.
    can i use the static string even if the class insnanse was dispose ?

  2. #2
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Static members

    Yes, these variables are not linked to any instance. As long as the class definition is in scope, the static variables should be accessible if they are public. If they are private, use or make properties.
    ahoodin
    To keep the plot moving, that's why.

  3. #3
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Static members

    And on a side note, you cannot "dispose a class", but I get what you were trying to say.
    If you liked my post go ahead and give me an upvote so that my epee.... ahem, reputation will grow.

    Yes; I have a blog too - http://the-angry-gorilla.com/

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

Featured