Can you tell me how to do this in COBOL (C# as the example). I’ve highlighted the constructor chaining method in yellow. public class Car { private Driver driver; public Driver Driver { get { return driver; } set { driver = value; } } public Car() : this (new Driver()) { Driver.Name = "Speed Racer"; } public Car(Driver driver) { this.driver = driver } } public class Driver { private string _name; public string Name { get { return _name; } set { _name = value; } } }
↧