我的ini
[Demo]
abc=123
BBB=323
111=222
StringBuilder temp = new StringBuilder();
GetPrivateProfileString("Demo", null, null, temp, 255, "d:\testWR\demo.ini");
MessageBox.Show(""+temp);
這樣只出現abc為何不是全部呢?
GetPrivateProfileString 只能讀取一個
讀全部要用GetPrivateProfileSection
你可以參考這篇答案
https://stackoverflow.com/questions/7090053/read-all-ini-file-values-with-getprivateprofilestring