花了無數小時來更改我的代碼,並刪除了所有不會被序列化,並將其更改爲字符串和編寫函數從字體/顏色轉換爲字符串,然後再回來我已經厭倦了,並決定讓我自己的基本串行..在C#應用程序中存儲用戶設置
private void saveSettings()
{
PropertyInfo[] properties = typeof(settingsObj).GetProperties();
foreach (settingsObj s in settings)
{
foreach (PropertyInfo property in properties)
{
MessageBox.Show(s.[property.Name]);
}
}
}
我如何引用變量使用字符串,在PHP中我會怎麼做:
$varIWantToRead = "foobar";
$varName = "varIWantToRead";
print $$varName;
更多鈔票複製http://stackoverflow.com/questions/453161/best-practice-to-save-application-settings-in-a-windows-forms-application – spajce