这是下面的代码,我确定有一种简单的方法可以做到这一点,但我对此并不陌生并且正在苦苦挣扎。如何让 textBoxLatitude.Text 显示项目 [0]?
namespace GPSCalculator
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
List<float> inputList = new List<float>();
TextReader tr = new StreamReader("c:/users/tom/documents/visual studio 2010/Projects/DistanceCalculator3/DistanceCalculator3/TextFile1.txt");
String input = Convert.ToString(tr.ReadToEnd());
String[] items = input.Split(',');
}
private void buttonNext_Click(object sender, EventArgs e)
{
textBoxLatitude.Text = (items[0]);
}
}
}