| name | aspose-words-examples |
|---|---|
| description | AI-friendly C# code examples for Aspose.Words for .NET |
| language | csharp |
| framework | net8.0 |
| package | Aspose.Words 26.7.0 |
AI-friendly repository containing validated C# examples for Aspose.Words for .NET API.
You are a C# developer specializing in Word processing using Aspose.Words for .NET. When working in this repository:
- Each
.csfile is a standalone Console Application - do not create multi-file projects - All examples must compile and run without errors using
dotnet buildanddotnet run - Follow the category-level
AGENTS.mdfiles for feature-specific rules - Use the Command Reference section for build/run commands
This repository contains 1795 working code examples demonstrating Aspose.Words for .NET capabilities.
Statistics (as of 2026-08-04):
- Total Examples: 1795
- Categories: 29
- Overall Pass Rate: 100.0%
- Source Run: 20260802_190455_803b68
- Examples: 30
- Packages: Aspose.Words, Aspose.BarCode, Aspose.Drawing.Common
- Guide: AGENTS.md
- Examples: 39
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 35
- Packages: Aspose.Words, Newtonsoft.Json
- Guide: AGENTS.md
- Examples: 108
- Packages: Aspose.Words, Aspose.Drawing.Common
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words, Newtonsoft.Json
- Guide: AGENTS.md
- Examples: 63
- Packages: Aspose.Words, Aspose.Drawing.Common, Newtonsoft.Json
- Guide: AGENTS.md
- Examples: 35
- Packages: Aspose.Words, Aspose.Drawing.Common
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 40
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 120
- Packages: Aspose.Words, Aspose.Drawing.Common, Newtonsoft.Json
- Guide: AGENTS.md
- Examples: 36
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 403
- Packages: Aspose.Words, Newtonsoft.Json, System.Text.Encoding.CodePages
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 35
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 110
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 70
- Packages: Aspose.Words, Aspose.Drawing.Common
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 35
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 30
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 40
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 34
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 34
- Packages: Aspose.Words
- Guide: AGENTS.md
- Examples: 198
- Packages: Aspose.Words, Newtonsoft.Json
- Guide: AGENTS.md
- Use public
Aspose.WordsAPIs and keep examples self-contained. - Keep each example as a single
.csconsole application. - Build with
net8.0and the configured package version. - Save the resulting document or output file when the task requires output.
- Keep input and output paths explicit and easy to follow.
- Prefer category-level guidance from each folder's
AGENTS.md.
- Adding extra NuGet packages beyond the known verifier package set.
- Changing shared repository infrastructure or project templates.
- Introducing platform-specific behavior not already present in the examples.
- Never create multi-file example projects for a single example.
- Never use invented or unsupported Aspose.Words APIs.
- Never modify generated
AGENTS.md,README.md, orindex.jsonby hand without regenerating related metadata. - Never rely on missing external input files; bootstrap sample inputs locally when possible.
AGENTS.md
README.md
index.json
llm.txt
+-- barcode-image/
+-- charts/
+-- comments/
+-- comparison/
+-- content-control/
+-- conversion/
+-- extraction/
+-- find-and-replace/
+-- fonts/
+-- form-fields/
+-- hyphenation/
+-- images/
+-- join-documents/
+-- linq-reporting/
+-- lists/
+-- mail-merge/
+-- officemath/
+-- ole-objects/
+-- paragraphs/
+-- programming-with-documents/
+-- range/
+-- rendering/
+-- security-and-protection/
+-- shapes/
+-- split-document/
+-- track-changes/
+-- vba-macros/
+-- watermark/
+-- working-with-table/
| Category | Examples | Pass Rate | Details |
|---|---|---|---|
| BarCode Image | 30 | 100.0% | AGENTS.md |
| Charts | 39 | 100.0% | AGENTS.md |
| Comments | 30 | 100.0% | AGENTS.md |
| Comparison | 30 | 100.0% | AGENTS.md |
| Content Control | 35 | 100.0% | AGENTS.md |
| Conversion | 108 | 100.0% | AGENTS.md |
| Extraction | 30 | 100.0% | AGENTS.md |
| Find and Replace | 63 | 100.0% | AGENTS.md |
| Fonts | 35 | 100.0% | AGENTS.md |
| Form Fields | 30 | 100.0% | AGENTS.md |
| Hyphenation | 40 | 100.0% | AGENTS.md |
| Images | 120 | 100.0% | AGENTS.md |
| Join Documents | 36 | 100.0% | AGENTS.md |
| LINQ Reporting | 403 | 100.0% | AGENTS.md |
| Lists | 30 | 100.0% | AGENTS.md |
| Mail Merge | 30 | 100.0% | AGENTS.md |
| OfficeMath | 30 | 100.0% | AGENTS.md |
| OLE Objects | 30 | 100.0% | AGENTS.md |
| Paragraphs | 35 | 100.0% | AGENTS.md |
| Programming With Documents | 110 | 100.0% | AGENTS.md |
| Range | 30 | 100.0% | AGENTS.md |
| Rendering | 70 | 100.0% | AGENTS.md |
| Security and Protection | 30 | 100.0% | AGENTS.md |
| Shapes | 35 | 100.0% | AGENTS.md |
| Split Document | 30 | 100.0% | AGENTS.md |
| Track Changes | 40 | 100.0% | AGENTS.md |
| VBA Macros | 34 | 100.0% | AGENTS.md |
| Watermark | 34 | 100.0% | AGENTS.md |
| Working With Table | 198 | 100.0% | AGENTS.md |
dotnet new console -n ExampleProject --framework net8.0
cd ExampleProjectdotnet add package Aspose.Words --version 26.7.0Add other packages only when an example requires them, for example:
dotnet add package Aspose.BarCode --version 26.7.0
dotnet add package Aspose.Drawing.Common --version 25.11.0
dotnet add package Newtonsoft.Json
dotnet add package SkiaSharp --version 3.119.0
dotnet add package System.Text.Encoding.CodePages --version 9.0.2Copy-Item ..\<category-folder>\<example-file>.cs .\Program.cs
dotnet build --configuration Release --verbosity minimal
dotnet run --configuration Release --no-build- Root files provide navigation and repository-wide constraints.
- Category folders are the source of truth for feature-specific behavior.
- Use each category's
README.md,AGENTS.md, andindex.jsonbefore editing or regenerating examples.
Maintained by an agentic example generation workflow | For repository overview, see README.md | Last updated: 2026-08-04