phdesign.NppToolBucket.Infrastructure.Settings.GetValue C# (CSharp) Method

GetValue() private method

private GetValue ( string sectionName, string keyName ) : string
sectionName string
keyName string
return string
        private string GetValue(string sectionName, string keyName)
        {
            const uint bufSize = 32767;
            var truncateLastByte = (sectionName == null || keyName == null) ? 1 : 0;
            var buffer = new char[bufSize];
            uint bytesReturned = GetPrivateProfileString(sectionName, keyName, null, buffer, bufSize, _iniFilePath);
            if (bytesReturned == 0)
                return string.Empty;

            return new string(buffer, 0, (int)bytesReturned - truncateLastByte);
        }