/** * <summary> * Switch the relay to the opposite state. * <para> * </para> * </summary> * <returns> * <c>0</c> if the call succeeds. * </returns> * <para> * On failure, throws an exception or returns a negative error code. * </para> */ public virtual int toggle() { if (_func == null) { throw new YoctoApiProxyException("No Watchdog connected"); } return(_func.toggle()); }