ClientLauncher.IniFiles.GetKeyNames C# (CSharp) Метод

GetKeyNames() публичный Метод

Gets the names of all keys under a specific section in the ini file.
The total length of all key names in the section must be less than 32KB in length.
/// is a null reference (Nothing in VB) ///
public GetKeyNames ( string sectionName ) : string[]
sectionName string /// The name of the section to read key names from. ///
Результат string[]
        public string[] GetKeyNames(string sectionName)
        {
            int len;
            string[] retval;

            if (sectionName == null)
                throw new ArgumentNullException("sectionName");

            //Allocate a buffer for the returned section names.
            IntPtr ptr = Marshal.AllocCoTaskMem(IniFiles.MaxSectionSize);

            try
            {
                //Get the section names into the buffer.
                len = NativeMethods.GetPrivateProfileString(sectionName,
                                                            null,
                                                            null,
                                                            ptr,
                                                            IniFiles.MaxSectionSize,
                                                            m_path);

                retval = ConvertNullSeperatedStringToStringArray(ptr, len);
            }
            finally
            {
                //Free the buffer
                Marshal.FreeCoTaskMem(ptr);
            }

            return retval;
        }