I am wondering, when does it become more efficient to pass by value in C#? I was reading this article:
The article suggests that passing by reference actually generates overhead when it transferrs the value type to the heap. My C/C++ classes swore by passing by reference as a good coding practice, and I have passed even primitive values by reference for a while now. I am in C# now, so I guess it is possible that it does not funciton the same, but I always thought that passing a pointer to a value was more efficient than copying the value of a variable to a new local variable in memory. Is there a certain number of bytes a data type has to be to become more efficient to pass by reference?