Disconnect() private method

private Disconnect ( int connection ) : ReturnValue
connection int
return ReturnValue
Ejemplo n.º 1
0
        public void Disconnect()
        {
            if (!Connected)
            {
                throw new Exception("Not connected.");
            }
            var error = LgLcd.Disconnect(Handle);

            if (error != LgLcd.ReturnValue.ErrorSuccess)
            {
                throw new Win32Exception((int)error);
            }
            // Reset the handle
            _handle = LgLcd.InvalidConnection;
        }