Exemplo n.º 1
0
        /// <summary>
        /// Removes a section from the files section list.
        /// </summary>
        /// <param name="section"></param>
        /// <returns></returns>
        public bool RemoveSection(NativeApi32.ImageSectionHeader32 section)
        {
            var index = this.Sections.IndexOf(section);

            if (index == -1)
            {
                return(false);
            }

            this.Sections.RemoveAt(index);
            this.SectionData.RemoveAt(index);

            return(true);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets a sections index by its name.
 /// </summary>
 /// <param name="section"></param>
 /// <returns></returns>
 public int GetSectionIndex(NativeApi32.ImageSectionHeader32 section)
 {
     return(this.Sections.IndexOf(section));
 }