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

Threaded View

  1. #12
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Modify Object by reference

    Yes, I'm afraid it is.
    It is absolutely unelegant, but it seems to be the only way.
    Well, I did modify my code already accordingly.

    Only, I would have liked to know why this IS.

    But never mind. If noone has an explanation, why public variables of an object cannot be modified by reference, I just have to take it in and live with the solutions we got.

    Although it seems quite illogical.
    It seems like the mentioned variables are explicitly passed ByVal (although declared ByRef), because they can be modified and used within the ModifyByRef() as you can with any variable passed ByVal.
    Last edited by WoF; September 2nd, 2011 at 04:02 PM.

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