public void AddTelephoneNumber(Telephone tel) { Telephone t = GetTelephoneNumber(tel.Type, tel.Location); if (t != null) { t.Remove(); } AddChild(tel); }
public Telephone[] GetTelephoneNumbers() { ElementList el = SelectElements(typeof(Telephone)); int i = 0; var result = new Telephone[el.Count]; foreach (Telephone tel in el) { result[i] = tel; i++; } return(result); }
public void AddTelephoneNumber(Telephone tel) { Telephone t = GetTelephoneNumber(tel.Type, tel.Location); if (t != null) t.Remove(); AddChild(tel); }
public Telephone[] GetTelephoneNumbers() { ElementList el = SelectElements(typeof (Telephone)); int i = 0; var result = new Telephone[el.Count]; foreach (Telephone tel in el) { result[i] = tel; i++; } return result; }