public static IPAddress GetIPAddressFrom(IAtomCollection collection, ID4 name) { var atom = collection.FindByName(name); IPAddress value = null; if (atom != null && atom.TryGetIPv4Address(out value)) { return value; } else { return null; } }