SocketTools .NET Edition

NntpClient.GetNextArticle Method 

Return information about the next article available in the current newsgroup.

[Visual Basic]
Public Function GetNextArticle( _
   ByRef article As NewsArticle _
) As Boolean
[C#]
public bool GetNextArticle(
   ref NewsArticle article
);

Parameters

article
A NewsArticle structure which will contain information about the article when the method returns.

Return Value

This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.

Remarks

The GetNextArticle method returns information about the next available article in the currently selected newsgroup. This method is used in conjunction with the GetFirstArticle method to enumerate all of the articles in the newsgroup. Typically this is used to provide the user with a list of articles to access.

While the articles in the newsgroup are being listed, the client cannot retrieve the contents of a specific article. For example, the GetArticle method cannot be called while inside a loop calling GetNextArticle. The client should store those articles which it wants to retrieve in an array, and then once all of the articles have been listed, it can begin calling GetArticle for each article number to retrieve the article text.

See Also

NntpClient Class | SocketTools Namespace