static void Main(string[] args) { MakeACaptain myCaptain = MakeACaptain.makeCaptain(); MakeACaptain otherCaptain = MakeACaptain.makeCaptain(); Console.ReadLine(); }
public static MakeACaptain makeCaptain() { if (_captain == null) { _captain = _captain = new MakeACaptain(); Console.WriteLine("First time that a captain is selected"); } else { Console.WriteLine("The captains was already selected"); } return(_captain); }