Pass parameters to methods by reference instead of by value