CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2006
    Posts
    306

    Dynamic Properties?

    I don't suppose you can add properties dynamically, can you?
    Code:
    void DoIt()
    {
        this.NewProperty = new Object();
    }
    DoIt();
    I would just have to define a List<Object> in a form and/or object.


    Also, Why can't I convert a form to an object array? Can someone help me here, or is it just not possible.
    Last edited by code?; September 24th, 2008 at 03:13 PM.

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    210

    Re: Dynamic Properties?

    It is no matter of "if it is possible", but it is matter of your design.
    It seems to be messed up a bit.

    There is no reason to add new members to a class. Why you want to do this?

  3. #3
    Join Date
    Apr 2006
    Posts
    220

    Re: Dynamic Properties?

    MNovy, I want to contact you personally. You have disabled receiving emails from this board. Kindly send a personal message to me or enable email sending for sometime.

  4. #4
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: Dynamic Properties?

    Why do you want to convert the Form into an object array?

  5. #5
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    210

    Re: Dynamic Properties?

    Quote Originally Posted by nabeelisnabeel
    MNovy, I want to contact you personally. You have disabled receiving emails from this board. Kindly send a personal message to me or enable email sending for sometime.

    this is was my PN system says:
    nabeelisnabeel has chosen not to receive private messages or may not be allowed to receive private messages. Therefore you may not send your message to him/her.

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