Connection.IsLocalConnection Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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();
}