CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Location
    Germany
    Posts
    936

    How to define a property?

    Hi,

    how do I define a property in my class? For simple datatypes I know what I have to do. But in my class I have an ArrayList and I want to put that in a property like Nodes from TreeView. Can someone give me a hint?

  2. #2
    Join Date
    May 2002
    Location
    Hyderabad
    Posts
    76
    Hi,
    you can define properties like this:
    private ArrayList myArr ;

    public MyArrayList
    {
    get
    {
    return myArr ;
    }
    set
    {
    myArr = value ;
    }
    }
    Ashish Sheth

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