private void button1_Click_1(object sender, RoutedEventArgs e)
{
TextValue foo;
List> listTextValue = new List>();
for (int k = 0; k < 5; ++k)
{
foo = new TextValue("",0);
foo.Text = k.ToString();
foo.Value = k;
listTextValue.Add(foo);
otherList.
MessageBox.Show(foo.Text);
}
}
class TextValue
{
public TextValue(TText text, TValue value){Text = text; Value = value;}
public TText Text { get; set; }
public TValue Value { get; set; }
}