public static bool Write(string strSection, string strKey, string strValue) { bool flag = false; try { IOEngine.WritePrivateProfileString(strSection, strKey, strValue, FileName); flag = true; } catch { flag = false; } return(flag); }
public static string Read(string strSection, string strKey) { try { StringBuilder builder = new StringBuilder(1024); IOEngine.GetPrivateProfileString(strSection, strKey, "", builder, 1024, FileName); return(builder.ToString()); } catch { return(""); } }