private void ValidateDnsNames() { if (DnsNames != null) { foreach (var dnsName in DnsNames) { if (string.IsNullOrWhiteSpace(dnsName)) { throw new ArgumentException("One of the DNS names provided is empty."); } } } }