我有这样的结构:
public struct GoldAverages
{
public decimal Sell_GoldOunce;
public decimal Buy_GoldOunce;
public decimal Sell_SilverOunce;
public decimal Buy_SilverOunce;
public int Sell_Mazene;
public int Buy_Mazene;
public int Sell_Gram_18;
public int Buy_Gram_18;
public int Sell_Gram_24;
public int Buy_Gram_24;
}
我怎样才能一一读取我的结构项目(按项目名称和值)并将它们放入 Lable.text
像这样
GoldAverages Gold = new GoldAverages();
foreach (var item in Gold)
{
LblSummery.Text += item.name + " : " + item.value + "|";
}