public static getarticle ( string title ) : |
||
title | string | |
Résultat |
public static NewsList getarticle(string title)
{
foreach (NewsList article in News_List)
{
if (article.Head == title) return article;
}
return null;
}
private void editNews_Click(object sender, EventArgs e) { if (nwsList.SelectedItem == null) { MessageBox.Show("You must first select a news item to edit..", "[SRX]", MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { //Populate informational gui boxes NewsList article = Systems.getarticle(nwsList.SelectedItem.ToString()); nwsTitle.Text = article.Head; nwsBody.Text = article.Msg; } }