예제 #1
0
        public static void Main(string[] args)
        {
            // The first if statement
            Potato potato = new Potato();

            if (potato != null)
            {
                if (potato.HasBeenPeeled && potato.IsRotten == false)
                {
                    Cook(potato);
                }
            }

            // The second if statemen
            int x    = 0;
            int minX = int.MinValue;
            int maxX = int.MaxValue;

            int y    = 0;
            int minY = int.MinValue;
            int maxY = int.MaxValue;

            bool shouldVisitCell = true;

            if ((minX <= x && x <= maxX) &&
                (minY <= y && y <= maxY) &&
                shouldVisitCell)
            {
                VisitCell();
            }
        }
예제 #2
0
 // This is need for the first if statement
 public static void Cook(Potato potato)
 {
     // Do Something...
 }