Shmuel Zang,
Thank you for your quick answer. My listbox name = listboxc
and so I have:
MyDataType val = listboxc.SelectedValue as MyDataType;
the problem is that I get an error:
Error 1 The type or namespace name 'MyDataType' could not be found (are you missing a using directive or an assembly reference?
Maybe its good to know that "condition" comes from an Class named WeatherInfo.cs
and contains the following:
namespace _7th_Heaven
{
public class WeatherInfo
{
public string day_of_week { get; set; }
public string low { get; set; }
public string high { get; set; }
public string icon { get; set; }
public string condition { get; set; }
}
}
To be short, I dont understand what you mean with:
get the SelectedItem (assuming that MyDataType is the type of your item's value):
MyDataType val = myListBox.SelectedValue as MyDataType;
I feel we are close.. but not there yet..