Posted on: 12/15/2013 3:59:25 PM | Views : 861

Hi 
following is copy/paste from channel 9 source code
why here static method is used 
using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace UnderstandingInheritance { class Program { static void Main(string[] args) { Car myCar = new Car(); myCar.Make = "BMW"; myCar.Model = "745li"; myCar.Color = "Black"; myCar.Year = 2005;
someMethod(myCar); //myCar.PrintMe();
Console.ReadLine(); }
private static void someMethod(Car car) { Console.WriteLine("From someMethod: {0}", car.Make); }
}
class Car { public string Make { get; set; } public string Model { get; set; ...

Go to the complete details ...