Original Post
public void function(ref int i)
{
// code
}
public void other_function()
{
int i = new int(5);
function(ref i);
}
That's right? So, I understand the 'ref' in the 'function' parameter list, but what about the 'ref' in the function call? Why does that need to be there? I've looked at a couple of sites, and MSDN, but the only things about it that I've seen is that it needs to be there. Not why.