static void Main() { copycondemo cd1 = new copycondemo(10); cd1.display(); copycondemo cd2 = new copycondemo(cd1); cd2.display(); Console.ReadLine(); }
public copycondemo(copycondemo obj) { x = obj.x; }