Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

RemoveParagraph and RemoveParagraphAt throw ArgumentOutOfRangeException

Open
#429 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
content

Research direction

Start at Container.RemoveParagraphAt(Int32 index), where the stack trace shows the failing removal, and reproduce the issue with a Table cell containing three paragraphs and index 0. Compare the behavior with removal on a DocX instance; done means RemoveParagraph and RemoveParagraphAt remove the selected cell paragraph without throwing ArgumentOutOfRangeException.

Written by the indexing model from the issue text.

Description

When applied to Table cell's paragraphs, functions RemoveParagraph and RemoveParagraphAt throw ArgumentOutOfRangeException.
Stack:

  System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
  System.Collections.Generic.List`1.RemoveAt(Int32 index)
  Xceed.Document.NET.Container.RemoveParagraphAt(Int32 index)

I attempted to remove at index = 0 with 3 paragraphs in the cell of a common Word table.

When applied to DocX instance, its OK.

Dominant language
C#
Stars
1.9k
Forks
482
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from xceedsoftware/DocX

All issues in xceedsoftware/DocX

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.