我目前正在使用 c# 构建一个 windows phone 8 应用程序,我想知道如何实现这一点:
for (int i = 1; i <= 18; i++)
{
_(i)Score.Text = "whatever here";
}
运行时应该是这样的:
_1Score.Text = "whatever here";
_2Score.Text = "whatever here";
_3Score.Text = "whatever here";
etc.
我怎么能做到这一点,因为只是推杆_(i)Score
不起作用。
编辑:我正在做的是制作一个有表格概览的记分卡应用程序。我将每一个命名为 1Socre、2Score、3Score 等,我只想更新他们所说的内容。它们都是文本框,我只是替换里面的文本。
请帮忙。谢谢