I'm trying to learn about RSS using PsychoCoder's PC_RSSReader. All went well, and I can even understand most of it (not good at collections yet). I got two similar errors I can't figure out. They read:
'object' does not contain a definition for 'Text'
'object' does not contain a definition for 'SubItems'
These refer to the lines of code below where I added the ****.
I'm wondering if it has something to do with a property setting I need to define for the lstNews?
(entire file is attached.)
Thanks,
Joe G.
CODE
private void lstNews_SelectedIndexChanged(object sender, EventArgs e)
{
//check to make sure an item is selected
if (lstNews.SelectedItems.Count == 1)
{
//Loop through all the items in the list
for (int i = 0; i < list.Count; i++)
{
//check and see if the selected title
//in the List Box matches the current
// of the list
if (list[i].Title == lstNews.SelectedItems[0].Text) ****
{
//set the description to the TextBox.Text
txtURL.Text = list[i].Description.Substring(0, 250);
}
}
}
}
private void lstNews_DoubleClick(object sender, EventArgs e)
{
//When double clicked open the web page
System.Diagnostics.Process.Start(lstNews.SelectedItems[0].SubItems[1].Text); ****
}