SessionDisconnect Method

Disconnects the session from the target.


Namespace: TwinCAT
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public bool Disconnect()

Return Value

Boolean
true if the Session is disconnected, false otherwise (the connection was disconnected before)

Implements

ISessionDisconnect

Exceptions

Exception

Condition

ObjectDisposedException

Remarks

Closes (and disposes) the underlying IConnection The Session itself will not be Disposed and can be reconnected.

Reference

Session Class TwinCAT Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026