public static IsValidIPv6 ( string address ) : bool | ||
address | string | |
return | bool |
public static bool IsValidIPv6WithNetmask(string address) { int num = address.IndexOf("/"); string text = address.Substring(num + 1); return(num > 0 && IPAddress.IsValidIPv6(address.Substring(0, num)) && (IPAddress.IsValidIPv6(text) || IPAddress.IsMaskValue(text, 128))); }
public static bool IsValid(string address) { return(IPAddress.IsValidIPv4(address) || IPAddress.IsValidIPv6(address)); }