Collection Class

Posted on 2004-10-21
Last Modified: 2010-04-23

I have a class called BookGroup which inheirits from collectionbase. The collection relates to Bookmark items. A bookmark is also a class.

My question is this: is it possible to retrieve the bookmarks parent i.e the bookgroup.

For instance I would like something like

Readonly Property Parent(bookMark as bmkBookMark) as bmkBookGroup
return 'How however I find the bookmarks related bookgroup here
End Get
End Property

Question by:zomby_dog
    LVL 6

    Accepted Solution

    What about:
    1) Creating a readonly property in the bookmark class such as 'public readonly property BookGroup() as string' for example.
    2) Change the New method of Bookmark to something like 'New(ByVal BookGroup as string)'.
    3) Use the new 'New' method to set the value of the variable associated with the BookGroup property

    Then you will have an easily accessable method for getting the bookgroup.
    LVL 6

    Expert Comment

    No Problem!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 ( But the ability to create custom scanning profiles a…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now