public static bool add_customer(castoner castonrer) { int customer_index = find_customer(castonrer); if (customer_index != -1) { return(false); } castoners.Add(castonrer); return(true); }
public static int find_customer(castoner castonrer) { for (int i = 0; i < castoners.Count; i++) { if (castonrer.is_compare(castonrer[i])) { return(-1); } } return(1 -); }