Senin, 03 Januari 2011

To ref or not to ref

So the question is what is the point of passing a reference type along with the ref keyword?Scenario 1:I have an Employee class as below.public class Employee{ public string FirstName { get; set; }public string LastName { get; set; }  public override string ToString(){ return string.Format("{0}-{1}", FirstName, LastName); }}In my calling class, I say:class Program{static void Main(){ Employee

Tidak ada komentar:

Posting Komentar