Share via


Connection.IsLocalConnection Property

Definition

Gets a value indicating whether the connection is local.

public:
 property bool IsLocalConnection { bool get(); };
public bool IsLocalConnection { get; }
member this.IsLocalConnection : bool
Public ReadOnly Property IsLocalConnection As Boolean

Property Value

true if the connection is local; false if the connection is remote.

Examples

public string IsLocalConnectionStr(IServiceProvider sp) {
    Connection con = (Connection)sp.GetService(typeof(Connection));
    return con.IsLocalConnection.ToString();
}

Applies to