예제 #1
0
        static void Main(string[] args)
        {
            MakeACaptain myCaptain    = MakeACaptain.makeCaptain();
            MakeACaptain otherCaptain = MakeACaptain.makeCaptain();

            Console.ReadLine();
        }
예제 #2
0
 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);
 }