Just learned from Eric Lippert's blog the difference between a "reference" and a "pointer". References are aliases names for variables and Pointers hold the address of these variables.
public int Add(ref x,ref y) { return x + y; }
The above example passes the reference of a variable into a method, which actually passes the alias name of the variable into the method.
Published under: Microsoft .NET Tips · · · ·