Exemple #1
0
        /// <summary>
        /// Advances the current article pointer to the next article.
        /// </summary>
        /// <returns>The server's response.</returns>
        /// <example>
        /// <code>
        /// C#
        ///
        /// NntpClient nntp = new NntpClient();
        ///
        /// nntp.Connect("news.myhost.com");
        ///
        /// NewsGroup group = nntp.SelectGroup("mygroup");
        /// //group.Pointer is equal to group.FirstArticle.
        /// group.Next();
        /// //group.Pointer is now equal to group.FirstArticle + 1.
        /// //Retrieve the second article in this group.
        /// Message article2 = group.RetrieveArticleObject();
        ///
        /// nntp.Disconnect();
        ///
        /// VB.NET
        ///
        /// Dim nntp As New NntpClient
        ///
        /// nntp.Connect("news.myhost.com")
        ///
        /// Dim group As NewsGroup = nntp.SelectGroup("mygroup")
        /// 'group.Pointer is equal to group.FirstArticle.
        /// group.Next()
        /// 'group.Pointer is now equal to group.FirstArticle + 1.
        /// 'Retrieve the second article in this group.
        /// Dim article2 As Message = group.RetrieveArticleObject()
        ///
        /// nntp.Disconnect()
        ///
        /// JScript.NET
        ///
        /// var nntp:NntpClient = new NntpClient();
        ///
        /// nntp.Connect("news.myhost.com");
        ///
        /// var group:NewsGroup = nntp.SelectGroup("mygroup");
        /// //group.Pointer is equal to group.FirstArticle.
        /// group.Next();
        /// //group.Pointer is now equal to group.FirstArticle + 1.
        /// //Retrieve the second article in this group.
        /// var article2:Message = group.RetrieveArticleObject();
        ///
        /// nntp.Disconnect();
        /// </code>
        /// </example>
        public string Next()
        {
            string response = _nntp.Command("next");

            if (response.StartsWith("223"))
            {
                Pointer = Convert.ToInt32(response.Split(' ')[1]);
            }
            return(response);
        }