title: VB.net console app pausing and staying open
body: <p>Hey all i am trying to understand how to keep my console app open even after it gathers data and sends it off. I am converting a GUI to the console app. It has a timer that fires the sub every 20 seconds. But it doesnt seem like it works in the console app since after it fires off the sub it closes the app without waiting.</p>
  
  <pre><code>Dim secTimer As New System.Timers.Timer(20000)
  
  Sub Main()
      Call copyRTDtoWS()
      AddHandler secTimer.Elapsed, AddressOf TimerDone
      secTimer.Enabled = True
  End Sub
  
  Public Sub copyRTDtoWS()
      Dim connectionString As String = GetConnectionString()
      Dim dataReader As SqlDataReader = Nothing
      etc etc...
      Call resetTimer()
  End Sub
  
  Private Sub resetTimer()
      secTimer.Stop()
      secTimer.Start()
  End Sub
  
  Public Sub TimerDone(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs)
      secTimer.Stop()
      Call copyRTDtoWS()
  End Sub
  </code></pre>
  
  <p>What all do i need to do in order for it to act like the GUI version did?</p>
  
  <p>Thanks for your time,</p>
  
  <p>David</p>