How to handle this error in telegrambot with visual 2013?
<p>I want with bot telegram Response any message when The request comes from the user's side for bot by webform, but When the value  of rs.message is null, Program error.</p>

<p>error:</p>

<blockquote>
  <p>An exception of type 'System.NullReferenceException' occurred in BotTelegramWeb.dll but was not handled in user code</p>
</blockquote>

<p>C# 2013 update3
webform 2013 update3</p>

<p>Summary code:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telegram.Bot;
using Telegram.Bot.Types;
using Telegram.Bot.Helpers;
using System.IO;
using Newtonsoft.Json;
using System.Net;


namespace BotTelegramWeb
{
    public partial class TaktopBot : System.Web.UI.Page
    {
        //Api bot = new Api("Token");
        Telegram.Bot.TelegramBotClient Bot = new Telegram.Bot.TelegramBotClient("Token");


        public class mydata
        {
            public result[] result;
        }
        public class result
        {
            public int update_id { get; set; }
            public message message { get; set; }
        }
        public class message
        {
            public int message_id { get; set; }
            public message_from from { get; set; }
            public message_chat chat { get; set; }
            public int date { get; set; }
            public string text { get; set; }
        }
        public class message_from
        {
            public int ind { get; set; }
            public string first_name { get; set; }
            public string username { get; set; }
        }
        public class message_chat
        {
            public int id { get; set; }
            public string first_name { get; set; }
            public string username { get; set; }
        }




        public static void SendMessage(string chat_id, string message)
        {
            WebRequest req = WebRequest.Create("https://api.telegram.org/Token/sendMessage?chat_id=@BestLaptopBuyTest&amp;text=123");
            req.UseDefaultCredentials = true;

            var result = req.GetResponse();
            req.Abort();
        }


        protected void Page_Load(object sender, EventArgs e)
        {



            WebRequest req = WebRequest.Create("https://api.telegram.org/bot" + "Token" + "/getUpdates");
            req.UseDefaultCredentials = true;
            WebResponse resp = req.GetResponse();
            Stream stream = resp.GetResponseStream();
            StreamReader sr = new StreamReader(stream);
            string s = sr.ReadToEnd();
            sr.Close();
            var jobject = Newtonsoft.Json.Linq.JObject.Parse(s);
            mydata gg = JsonConvert.DeserializeObject&lt;mydata&gt;(jobject.ToString());
            List&lt;result&gt; results = new List&lt;result&gt;();
            foreach (result rs in gg.result)
            {
                results.Add(rs);
                SendMessage(rs.message.chat.id.ToString(), "hello" + " " + "Dear" + rs.message.chat.first_name);
            }

        }   
    }
}
</code></pre>

<p>error:</p>

<blockquote>
  <p>An exception of type 'System.NullReferenceException' occurred in BotTelegramWeb.dll but was not handled in user code</p>
</blockquote>

<p>1.one message of gg.result`messages from bot is null.How to not get null message.</p>

<ol start="2">
<li><p>i want to send message with bot when user send any message but i can not.</p></li>
<li><p>how to can use webhook method Instead update method in this example?</p></li>
</ol>

<p>respone from : <a href="https://api.telegram.org/Token/getUpdates" rel="nofollow noreferrer">https://api.telegram.org/Token/getUpdates</a></p>

<pre><code>{"ok":true,"result":[{"update_id":547758881,
"message":{"message_id":11,"from":{"id":301646351,"first_name":"s","last_name":"s"},"chat":{"id":301646351,"first_name":"s","last_name":"s","type":"private"},"date":1482667543,"text":"s"}},{"update_id":547758882,
"message":{"message_id":12,"from":{"id":301646351,"first_name":"s","last_name":"s"},"chat":{"id":301646351,"first_name":"s","last_name":"s","type":"private"},"date":1482667701,"text":"a"}},{"update_id":547758883,
"channel_post":{"message_id":26,"chat":{"id":-1001096443511,"title":"BestLaptopBuyTest","username":"BestLaptopBuyTest","type":"channel"},"date":1482671517,"text":"hello"}},{"update_id":547758884,
"message":{"message_id":21,"from":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1"},"chat":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1","type":"private"},"date":1482676503,"text":"s"}},{"update_id":547758885,
"message":{"message_id":45,"from":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1"},"chat":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1","type":"private"},"date":1482677210,"text":"ab"}},{"update_id":547758886,
"channel_post":{"message_id":112,"chat":{"id":-1001096443511,"title":"BestLaptopBuyTest","username":"BestLaptopBuyTest","type":"channel"},"date":1482741137,"text":"mohsen"}},{"update_id":547758887,
"message":{"message_id":144,"from":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1"},"chat":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1","type":"private"},"date":1482741149,"text":"mohsen"}},{"update_id":547758888,
"message":{"message_id":145,"from":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1"},"chat":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1","type":"private"},"date":1482741163,"text":"ma"}},{"update_id":547758889,
"message":{"message_id":146,"from":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1"},"chat":{"id":301646351,"first_name":"s","last_name":"s","username":"TestMohsen1","type":"private"},"date":1482747400,"text":"salam"}}]}
</code></pre>