public static void Delete(string phonenumber) { WhiteList wl = new WhiteList(); wl.Load(); WhiteListItem wli = wl.Find(p => p.phoneNumber == phonenumber); wl.Remove(wli); wl.Save(); }
public static void Add(string phonenumber) { if (phonenumber.Trim() == string.Empty) { return; } WhiteList wl = new WhiteList(); WhiteListItem wli = new WhiteListItem(); wli.phoneNumber = phonenumber; wli.checkSum = CRC32.Compute(phonenumber); wl.Load(); wl.Add(wli); wl.Save(); }