SqlConnectionStringBuilder.IPAddressPreference Property

Definition

Gets or sets the IP address family preference when establishing TCP connections.

C#
public Microsoft.Data.SqlClient.SqlConnectionIPAddressPreference IPAddressPreference { get; set; }

Property Value

Returns the IP address preference.

Remarks

If Transparent Network IP Resolution (in .NET Framework) or Multi Subnet Failover is set to true, this setting has no effect.

Applies to

Produk Versi
SqlClient .NET Core 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2
SqlClient .NET Framework 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2
SqlClient .NET Standard 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2