Posted By:
Terry_Laurenzo
Posted On:
Sunday, April 14, 2002 10:44 AM
The most straight-forward approach to doing this(although generally not the best way) is to pass an array instead of a primitive value. The invoked method can change the contents of the array and the caller can access these changes. This will give you the pass-by-reference semantics that it looks like you're after.
For anything but the most trivial cases, though, your difficulty probably indicates a design flaw in your classes. Consider refactoring your classes so that your argument "p" is itself a class.