Hello:
Sorry this way ;)
private IPAddress GetIPAddress(string dataSource, AddressFamily
addressFamily)
{
IPAddress ipaddress = null;
if (!IPAddress.TryParse(dataSource, out ipaddress))
{
return ipaddress;
}
IPAddress[] addresses =
Dns.GetHostEntry(dataSource).AddressList;
// Try to avoid problems with IPV6 addresses
foreach (IPAddress address in addresses)
{
if (address.AddressFamily == addressFamily)
{
return address;
}
}
return addresses[0];
}
--
Carlos Guzmán Álvarez
Vigo-Spain
Blog : http://carlosga.wordpress.com/
FirebirdClient : http://www.firebirdsql.org/
XMPP Client : http://code.google.com/p/xmppclient/
ohloh : http://www.ohloh.net/accounts/4138
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider