Sometimes, I got helper methods like:
private string generateReport(string doc, List<string> sheets, Blah blahblah)
{
//doStuff()
}
Seeing a lot of this in my code makes me wonder if I'm messing with the computer memory - throwing parameters to and fro. On a basic level, this problem is solved by having class level variables but in some cases, I may be deriving from a class or using a helper method from another class. So my question is:
Is using references a preferable option? i.e.
private string generateReport(ref string doc, ref List<string> sheets, ref Blah blahblah)
{
//doStuff()
}
and when should I not use it (if applicable)?
Thanks.