1
在顯示Windows.Forms.OpenFileDialog
我怎麼能存儲數據路徑到名爲m_settings
變量下面的C#類?C#:存儲從一個OpenFileDialog的數據路徑到一個變量?
private SomeKindOfData m_settings;
public void ShowSettingsGui()
{
System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog();
ofd.Multiselect = true;
ofd.Filter = "Data Sources (*.ini)|*.ini*|All Files|*.*";
if (ofd.ShowDialog() == DialogResult.OK)
{
string[] filePath = ofd.FileNames;
string[] safeFilePath = ofd.SafeFileNames;
}
m_settings = //<-- ?
}