public GetString ( string sectionName, string keyName, string defaultValue ) : string | ||
sectionName | string | The name of the section to read from. |
keyName | string | The name of the key in section to read. |
defaultValue | string | The default value to return if the key /// cannot be found. |
return | string |
public string GetString(string sectionName,
string keyName,
string defaultValue)
{
if (sectionName == null)
throw new ArgumentNullException("sectionName");
if (keyName == null)
throw new ArgumentNullException("keyName");
StringBuilder retval = new StringBuilder(IniFiles.MaxSectionSize);
NativeMethods.GetPrivateProfileString(sectionName,
keyName,
defaultValue,
retval,
IniFiles.MaxSectionSize,
m_path);
return retval.ToString();
}