我有一个提要阅读器并在列表框中获取标题,但是如何插入标题的值链接?
private void Form1_Load(object sender, EventArgs e)
{
var reader = XmlReader.Create("http://feeds.feedburner.com/myusername?format=xml");
var feed = SyndicationFeed.Load<SyndicationFeed>(reader);
foreach (var item in feed.Items)
{
listBox1.Items.Add(item.Title.Text);
listBox1."add value link" = item.Links."Text";
}
}
private void listBox1_Click(object sender, EventArgs e)
{
MessageBox.Show(listBox1."value link for item selected".ToString());
}
如果点击标题显示链接
例如:点击my feed2
显示wwww/mywebsite/myfeed2