SocketTools .NET Edition

NewsFeed.GetItem Method 

Set the current news item to the specified item number.

[Visual Basic]
Public Function GetItem( _
   ByVal itemId As Integer _
) As Boolean
[C#]
public bool GetItem(
   int itemId
);

Parameters

itemId
An integer value which specifies item in the news feed channel.

Return Value

A boolean value that specifies if the news item was found. A return value of true indicates success, while a return value of false indicates failure. If the method fails, the value of the LastError property can be used to determine cause of the failure.

Remarks

The item number is an index into the list of available news items in the current news feed. The first news item is one, and it increments for each additional item in the feed. If itemId parameter is zero or specifies a value larger than the number of items in the feed, this method will fail.

If this method returns true, the current news item is changed to the specified value and property values such as ItemLink and ItemText will be updated. If this method returns false, the current news item is not changed.

If this method fails, it typically indicates that the itemId parameter is invalid or that the feed does not contain any valid news items. The ItemCount property can be used to determine the number of items contained in the news feed channel.

See Also