API Reference
Class
SystemInformation
Defines the class for getting system information.
Inheritance
- Object
- SystemInformation
Remarks
Methods in this class assist in obtaining DNS server details from the operating system.
Constructors
public SystemInformation() #Methods
FormatDnsAddress(System.Net.IPAddress address) #Formats a DNS address properly, handling IPv6 zone identifiers and brackets.
Parameters
- address System.Net.IPAddress
- The IP address to format
Returns
Properly formatted DNS address string
public static List<String> GetDnsFromActiveNetworkCard(Boolean refresh = false) #Returns:
List<String>Gets the DNS from active network card with improved cross-platform reliability. The results are cached for subsequent calls unless refresh is true.
Parameters
- refresh System.Boolean = false
- Set to true to force cache refresh.
IsValidDnsAddress(System.Net.IPAddress address) #Validates if an IP address is suitable for use as a DNS server.
Parameters
- address System.Net.IPAddress
- The IP address to validate
Returns
True if the address is valid for DNS use