Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: Constructor Chaining

$
0
0
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; }      } }  

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>