/// <summary> /// Removes a section from the files section list. /// </summary> /// <param name="section"></param> /// <returns></returns> public bool RemoveSection(NativeApi64.ImageSectionHeader64 section) { var index = this.Sections.IndexOf(section); if (index == -1) { return(false); } this.Sections.RemoveAt(index); this.SectionData.RemoveAt(index); return(true); }
/// <summary> /// Gets a sections index by its name. /// </summary> /// <param name="section"></param> /// <returns></returns> public int GetSectionIndex(NativeApi64.ImageSectionHeader64 section) { return(this.Sections.IndexOf(section)); }