title: How to get updates and reply telegram bot?
body: <p>This is my code that i try to connect to a telegram bot</p>
  
  <pre><code>namespace telegramUpdate
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
          TelegramBotClient bot = new TelegramBotClient("xxxxxxxxx");
          int offset = 23;
          Update temp = null;
          private void Form1_Load(object sender, EventArgs e)
          {
              backgroundWorker1.RunWorkerAsync();
          }
  
          private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
          {
              while (true)
              {
                  try
                  {
                      var m = Task.Run(async()=&gt; bot.GetUpdatesAsync(offset,50)).Result;
                      foreach (var x in m.Result)
                      {
                          switch (x.Type)
                          {
                              case UpdateType.MessageUpdate:
                                  temp = x;
                                  backgroundWorker1.ReportProgress(0);
                                  bot.SendTextMessageAsync(x.Message.Chat.Id, ":)").ConfigureAwait(false);
                                  break;
                          }
                          offset = x.Id+1;
                      }
                  }
                  catch (Exception ex)
                  {
                      MessageBox.Show(ex.Message);
  
                  }
              }
          }
  
          private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
          {
              backgroundWorker1.RunWorkerAsync();
          }
  
          private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
          {
              label1.Text = temp.Message.From.FirstName;
          }
      }
  }
  </code></pre>
  
  <p>after ruining message box show "One or more errors occurred." what is the problem? telegram bot should reply ":)" but it don't. I can not find out if m receive any updates or not.</p>