inidbi2.inidbi2.GetSections C# (CSharp) Method

GetSections() public method

public GetSections ( string File ) : string
File string
return string
        public string GetSections(string File)
        {
            byte[] temp = new byte[8000];
            int s = GetPrivateProfileSectionNames(temp, 8000, File);
            String result = Encoding.Default.GetString(temp);
            String[] names = result.Split('\0');
            result = "[";
            foreach (String name in names)
            {
                if (name != String.Empty)
                {
                    result = result + "\"" + name + "\",";
                }
            }
            result = result.Remove(result.Length - 1, 1);
            result = result + "]";
            return result;
        }