void StartTryToConnect() { var timer = new Timer(TryToConnect); timer.Change(Convert.ToInt32(retryDelay.TotalMilliseconds), Timeout.Infinite); }