Results 1 to 5 of 5

Thread: A previously answered question I got wrong...

  1. #1

    Thread Starter
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    A previously answered question I got wrong...

    Forgot who it was, but someone had asked having a class within a class(nested classes). I said no, but it turns out I was wrong..you cna have a class within a class..Just a a pointer. I am not sure why someone would want to, but I guess there can be reasons.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    as like in C++ Classes can be used as containers.

    ex.

    VB Code:
    1. Public Class Bank
    2.  
    3.   ...
    4.  
    5.      Private Class Vault
    6.  
    7.         ...
    8.      End Class
    9.  
    10.  
    11. End Class

    The Bank class would be a container for the Vault class. This would mean that only the Bank class would have access to the Vault's class member variables and methods, thus abstracting the inner workings of the Vault class from the customers of the Bank.
    Dont gain the world and lose your soul

  3. #3

    Thread Starter
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    ahh makes better sense now.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    When I think VERY VERY VERY hard, I figure out that it was me who asked the question
    tnx

  5. #5
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Yeah Visual Basic now supports inner classes.
    I have yet to use them but i use them from
    time to time in Java. Im sure the concept is
    the same or similar in Visual Basic.

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