From 41d927df96fe1f94c2d2e2efa1d4324f30381170 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 10 Apr 2021 14:16:41 +0530 Subject: [PATCH] minor code refactoring --- DnsServerSystemTrayApp/MainApplicationContext.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DnsServerSystemTrayApp/MainApplicationContext.cs b/DnsServerSystemTrayApp/MainApplicationContext.cs index 726e692e..7092f136 100644 --- a/DnsServerSystemTrayApp/MainApplicationContext.cs +++ b/DnsServerSystemTrayApp/MainApplicationContext.cs @@ -570,7 +570,7 @@ namespace DnsServerSystemTrayApp if (nic.OperationalStatus != OperationalStatus.Up) continue; - SetNameServerIPv6(nic, new IPAddress[] { }); + SetNameServerIPv6(nic, Array.Empty()); try { @@ -578,7 +578,7 @@ namespace DnsServerSystemTrayApp if (properties.GetIPv4Properties().IsDhcpEnabled) { - SetNameServerIPv4(nic, new IPAddress[] { }); + SetNameServerIPv4(nic, Array.Empty()); } else if (properties.GatewayAddresses.Count > 0) { @@ -586,7 +586,7 @@ namespace DnsServerSystemTrayApp } else { - SetNameServerIPv4(nic, new IPAddress[] { }); + SetNameServerIPv4(nic, Array.Empty()); } } catch (NetworkInformationException)