agentic-net-examples / lists
AGENTS.md4 starsChanged 3 months agoMITView on GitHub
Verified C# examples for lists scenarios in Aspose.Words for .NET
1 other project uses a version of this.
Adopted by
Most recently taken up by
- moasq/ios-dev-agenttheir own version, first seen May 26, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- moasq/ios-dev-agent★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository29 other files it gives its agents.
- aspose-words-examplesAGENTS.md
- barcode-imageAGENTS.md
- chartsAGENTS.md
- commentsAGENTS.md
- comparisonAGENTS.md
- content-controlAGENTS.md
- conversionAGENTS.md
- extractionAGENTS.md
- find-and-replaceAGENTS.md
- fontsAGENTS.md
- form-fieldsAGENTS.md
- hyphenationAGENTS.md
- imagesAGENTS.md
- join-documentsAGENTS.md
- linq-reportingAGENTS.md
- mail-mergeAGENTS.md
- officemathAGENTS.md
- ole-objectsAGENTS.md
- paragraphsAGENTS.md
- programming-with-documentsAGENTS.md
- rangeAGENTS.md
- renderingAGENTS.md
- security-and-protectionAGENTS.md
- shapesAGENTS.md
- split-documentAGENTS.md
- track-changesAGENTS.md
- vba-macrosAGENTS.md
- watermarkAGENTS.md
- working-with-tableAGENTS.md
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Create lists with doc.Lists.Add(ListTemplate).
- Distinctive: line 19
Use builder.ListFormat.ListLevelNumber for nested list levels.
- Distinctive: line 20
Call builder.ListFormat.RemoveNumbers() after finishing a list.
- Distinctive: line 21
Do not invent unsupported list APIs.
- Distinctive: line 32
Use the simplest workflow that satisfies the task.
- Distinctive: line 249
When replacing a file, prefer the latest verified publish-ready version rather than a merely compiling draft.
- Distinctive: line 250
Keep examples standalone, bootstrap missing inputs locally, and prefer documented Aspose APIs over speculative shortcuts.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md - Lists
Purpose
This folder is a live, curated example set for Lists scenarios. Treat every .cs file as a standalone console application. The goal is correct, warning-free examples that use documented Aspose APIs and match the original task intent.
Non-negotiable conventions
- Create lists with doc.Lists.Add(ListTemplate).
- Apply a list through builder.ListFormat.List before writing list items.
- Use builder.ListFormat.ListLevelNumber for nested list levels.
- Call builder.ListFormat.RemoveNumbers() after finishing a list.
- Do not invent unsupported list APIs.
Recommended workflow selection
- Numbered List Workflow workflow: 2 examples
- Bulleted List Workflow workflow: 1 examples
- Nested List Workflow workflow: 17 examples
- List Formatting Workflow workflow: 5 examples
- General List Workflow workflow: 4 examples
- Numbering Control Workflow workflow: 1 examples
Use the simplest workflow that satisfies the task.
Validation priorities
- The code must compile and run without manual input.
- API usage must be supported by the configured package versions.
- Exported outputs must actually be written by the example.
- Validation scenarios must inspect only the behavior requested by the task.
- Examples that depend on files, folders, streams, images, or data should bootstrap those inputs locally during the example run.
File-to-task reference
create-a-default-numbered-list-in-a-word-document-using-documentbuilder-listformat-applynu.cs- Task: Create a default numbered list in a Word document using DocumentBuilder.ListFormat.ApplyNumberDefault method.
- Workflow: numbered-list-workflow
- Outputs: docx
- Selected engine: mcp
apply-a-default-bulleted-list-to-paragraphs-with-documentbuilder-listformat-applybulletdef.cs- Task: Apply a default bulleted list to paragraphs with DocumentBuilder.ListFormat.ApplyBulletDefault method for formatting.
- Workflow: bulleted-list-workflow
- Outputs: docx
- Selected engine: mcp
set-listlevelnumber-to-three-before-adding-a-paragraph-to-create-a-third-level-list-item-i.cs- Task: Set ListLevelNumber to three before adding a paragraph to create a third-level list item in the document.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
increase-list-indent-programmatically-using-documentbuilder-listformat-increaseindent-to-m.cs- Task: Increase list indent programmatically using DocumentBuilder.ListFormat.IncreaseIndent to move paragraph deeper within the current list structure.
- Workflow: list-formatting-workflow
- Outputs: docx
- Selected engine: mcp
decrease-list-indent-with-documentbuilder-listformat-decreaseindent-to-promote-paragraph-t.cs- Task: Decrease list indent with DocumentBuilder.ListFormat.DecreaseIndent to promote paragraph to higher level in the outline.
- Workflow: list-formatting-workflow
- Outputs: docx
- Selected engine: mcp
remove-numbering-from-a-paragraph-by-calling-documentbuilder-listformat-removenumbers-meth.cs- Task: Remove numbering from a paragraph by calling DocumentBuilder.ListFormat.RemoveNumbers method to stop list formatting.
- Workflow: numbered-list-workflow
- Outputs: docx
- Selected engine: mcp
create-a-custom-list-object-configure-its-levels-and-add-it-to-document-lists-collection.cs- Task: Create a custom List object, configure its levels, and add it to Document.Lists collection.
- Workflow: nested-list-workflow
- Outputs: doc
- Selected engine: mcp
add-a-new-list-to-the-document-s-listcollection-and-assign-it-to-multiple-paragraphs-to-sh.cs- Task: Add a new List to the document's ListCollection and assign it to multiple paragraphs to share formatting.
- Workflow: general-list-workflow
- Outputs: docx
- Selected engine: mcp
assign-an-existing-list-to-a-paragraph-by-setting-paragraph-listformat-list-property-to-ap.cs- Task: Assign an existing List to a paragraph by setting Paragraph.ListFormat.List property to apply the desired list style.
- Workflow: list-formatting-workflow
- Outputs: docx
- Selected engine: mcp
clone-an-existing-list-modify-its-level-start-values-and-apply-the-cloned-list-to-new-sect.cs- Task: Clone an existing List, modify its level start values, and apply the cloned list to new sections.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
set-numberstyle-of-a-listlevel-to-upperroman-to-generate-roman-numeral-list-items.cs- Task: Set NumberStyle of a ListLevel to UpperRoman to generate Roman numeral list items.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
apply-a-custom-bullet-character-to-a-list-by-setting-listlevel-numberstyle-to-bullet-and-d.cs- Task: Apply a custom bullet character to a list by setting ListLevel.NumberStyle to Bullet and defining BulletChar.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
define-startingnumber-for-a-listlevel-to-begin-numbering-at-five-instead-of-default-one.cs- Task: Define StartingNumber for a ListLevel to begin numbering at five instead of default one.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
restart-numbering-for-each-new-section-by-resetting-listlevel-startingnumber-before-applyi.cs- Task: Restart numbering for each new section by resetting ListLevel.StartingNumber before applying the list.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
create-a-numbered-list-that-restarts-numbering-at-each-new-chapter-by-resetting-startingnu.cs- Task: Create a numbered list that restarts numbering at each new chapter by resetting StartingNumber on chapter start.
- Workflow: numbering-control-workflow
- Outputs: docx
- Selected engine: mcp
create-a-nine-level-hierarchical-list-by-defining-properties-for-each-listlevel-up-to-leve.cs- Task: Create a nine-level hierarchical list by defining properties for each ListLevel up to level nine.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
create-a-multi-level-list-with-alternating-bullet-and-number-styles-by-configuring-each-li.cs- Task: Create a multi-level list with alternating bullet and number styles by configuring each ListLevel individually.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
adjust-listlevel-indentation-by-setting-listlevel-indentation-to-36-points-for-proper-alig.cs- Task: Adjust ListLevel indentation by setting ListLevel.Indentation to 36 points for proper alignment.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
apply-a-custom-tab-stop-to-list-levels-to-align-text-after-numbers-using-listlevel-tabposi.cs- Task: Apply a custom tab stop to list levels to align text after numbers using ListLevel.TabPosition property.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
configure-tabposition-of-a-listlevel-to-72-points-to-align-text-after-list-number.cs- Task: Configure TabPosition of a ListLevel to 72 points to align text after list number.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
validate-that-each-list-in-a-document-does-not-exceed-nine-levels-to-comply-with-api-const.cs- Task: Validate that each list in a document does not exceed nine levels to comply with API constraints.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
implement-error-handling-for-attempts-to-create-more-than-nine-list-levels-catching-the-re.cs- Task: Implement error handling for attempts to create more than nine list levels, catching the resulting exception.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
ensure-ooxmlcompliance-is-set-higher-than-ecma376-before-saving-document-to-retain-custom.cs- Task: Ensure OoxmlCompliance is set higher than Ecma376 before saving document to retain custom list settings.
- Workflow: general-list-workflow
- Outputs: docx
- Selected engine: mcp
check-document-ooxmlcompliance-property-and-set-to-higher-than-ecma376-when-modifying-list.cs- Task: Check document OoxmlCompliance property and set to higher than Ecma376 when modifying list definitions.
- Workflow: general-list-workflow
- Outputs: docx
- Selected engine: mcp
retrieve-a-specific-list-from-document-lists-by-its-id-and-adjust-its-level-properties-pro.cs- Task: Retrieve a specific List from Document.Lists by its ID and adjust its level properties programmatically.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
iterate-through-document-lists-collection-to-modify-all-list-definitions-uniformly-across.cs- Task: Iterate through Document.Lists collection to modify all list definitions uniformly across the document.
- Workflow: general-list-workflow
- Outputs: docx
- Selected engine: mcp
apply-a-uniform-list-style-to-all-lists-by-iterating-over-document-lists-and-updating-each.cs- Task: Apply a uniform list style to all lists by iterating over Document.Lists and updating each level.
- Workflow: list-formatting-workflow
- Outputs: docx
- Selected engine: mcp
programmatically-increase-list-level-depth-for-a-paragraph-using-documentbuilder-listforma.cs- Task: Programmatically increase list level depth for a paragraph using DocumentBuilder.ListFormat.IncreaseIndent within a loop.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
programmatically-decrease-list-level-depth-for-a-paragraph-using-documentbuilder-listforma.cs- Task: Programmatically decrease list level depth for a paragraph using DocumentBuilder.ListFormat.DecreaseIndent inside a conditional.
- Workflow: nested-list-workflow
- Outputs: docx
- Selected engine: mcp
programmatically-remove-list-formatting-from-selected-paragraphs-while-preserving-their-in.cs- Task: Programmatically remove list formatting from selected paragraphs while preserving their indentation using ListFormat.RemoveNumbers.
- Workflow: list-formatting-workflow
- Outputs: docx
- Selected engine: mcp
Common failure patterns and preferred agent fixes
- Invented list APIs
- Symptom: Code uses unsupported helpers such as CreateList or AddListItem.
- Preferred fix: Use doc.Lists.Add(ListTemplate) and builder.ListFormat.List only.
- List formatting not applied
- Symptom: Paragraphs are written but they are not actual list items.
- Preferred fix: Assign builder.ListFormat.List before writing each list sequence.
- Nested level drift
- Symptom: Nested items appear at the wrong level or never return to the parent level.
- Preferred fix: Set builder.ListFormat.ListLevelNumber explicitly before each nested level transition.
- List mode not cleared
- Symptom: Subsequent paragraphs continue as list items unintentionally.
- Preferred fix: Call builder.ListFormat.RemoveNumbers() immediately after the list is complete.
Build and run contract
- Target framework:
net8.0 - Package:
Aspose.Words26.9.0
Command reference
Create a temporary console project
dotnet new console -n ExampleProject --framework net8.0
cd ExampleProjectAdd required packages
dotnet add package Aspose.Words --version 26.9.0Copy a category example into the temp project
Copy-Item ..\lists\<example-file>.cs .\Program.csBuild and run
dotnet build --configuration Release --verbosity minimal
dotnet run --configuration Release --no-buildCategory update guidance
- Preserve file-to-task traceability. Any future update should keep the original task text associated with the file in metadata.
- When replacing a file, prefer the latest verified publish-ready version rather than a merely compiling draft.
- Keep examples standalone, bootstrap missing inputs locally, and prefer documented Aspose APIs over speculative shortcuts.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

