public void Visit(OutBetween ckout) { if (ckout.CKnum <= ckout.StarNum && ckout.CKnum <= ckout.EndNum) { Console.WriteLine("Cknumber: " + ckout.CKnum + " OutBetween: " + ckout.StarNum + "~" + ckout.EndNum + " False"); } else { Console.WriteLine("Cknumber: " + ckout.CKnum + " OutBetween: " + ckout.StarNum + "~" + ckout.EndNum + " True"); } }
public static void Accept(OutBetween target, IBetweenVisitor visitor) { visitor.Visit(target); }