private void button2_Click(object sender, EventArgs e) { if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { String saveFile = saveFileDialog1.FileName; int numberOfEVec = (int)numericUpDown1.Value; PointSet p = _pca.GetPCAProjection(numberOfEVec); p.Save(saveFile); MessageBox.Show("File saved to\n" + saveFile); } }