agentic-net-examples
AGENTS.md4 starsChanged 3 months agoMITView on GitHub
AI-friendly C# code examples for Aspose.BarCode for .NET
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,736 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 repository21 other files it gives its agents.
- barcode-appearance-customizationAGENTS.md
- barcode-checksum-controlAGENTS.md
- barcode-color-customizationAGENTS.md
- barcode-configuration-serializationAGENTS.md
- barcode-reading-propertiesAGENTS.md
- barcode-recognition-basicsAGENTS.md
- barcode-recognition-performanceAGENTS.md
- barcode-recognition-xml-serializationAGENTS.md
- barcode-saving-and-exportAGENTS.md
- barcode-size-and-resolutionAGENTS.md
- barcode-text-customizationAGENTS.md
- gs1-barcode-typesAGENTS.md
- hibc-lic-barcodeAGENTS.md
- mailmark-four-state-barcodeAGENTS.md
- mailmark-two-dimensional-barcodeAGENTS.md
- maxicode-barcodeAGENTS.md
- one-dimensional-barcode-typesAGENTS.md
- postal-barcode-typesAGENTS.md
- special-barcode-recognition-settingsAGENTS.md
- swiss-qr-codeAGENTS.md
- two-dimensional-barcode-typesAGENTS.md
The file
We split this agents.md into the rules it gives an agent
11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
When working in this repository:
- Very specific: line 18
All examples must compile and run without errors using dotnet build and dotnet run
- Distinctive: line 19
Follow the conventions, boundaries, and anti-patterns documented below exactly
- Distinctive: line 20
Use the Command Reference section for build/run commands
- Very specific: line 176
Never use System.Drawing — always use Aspose.Drawing
- Very specific: line 177
Never use EncodeTypes as a variable, field, or parameter type — use BaseEncodeType
- Very specific: line 178
Never call Environment.Exit(1) — use Console.WriteLine for failure reporting
- Very specific: line 179
Never use generator.Parameters.BorderColor or generator.Parameters.BorderWidth
- Very specific: line 180
Never use generator.Parameters.Padding.* — use generator.Parameters.Barcode.Padding.*
- Very specific: line 182
Never use reader.BarcodeSettings.QualitySettings — use reader.QualitySettings directly
- Very specific: line 183
Never use result.IsCodeTextValid — it does not exist on BarCodeResult
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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
Aspose.BarCode for .NET Examples
AI-friendly repository containing validated C# examples for Aspose.BarCode for .NET API.
Persona
You are a C# developer specializing in barcode generation and recognition using Aspose.BarCode 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 conventions, boundaries, and anti-patterns documented below exactly
- Use the Command Reference section for build/run commands
Capabilities
This agent generates validated C# examples for the following Aspose.BarCode for .NET operations:
- 1D Barcode Generation — Code128, Code39, EAN-13, EAN-8, UPC-A, UPC-E, ITF, Codabar, and 50+ symbologies
- 2D Barcode Generation — QR Code, DataMatrix, PDF417, Aztec, MaxiCode, GS1 DataBar
- Postal Barcodes — Mailmark (4-State and 2D), USPS, Australia Post, Deutsche Post
- Special Barcodes — HIBC LIC, Swiss QR Code, PatchCode, Pharmacode
- Barcode Recognition — Read barcodes from images, PDFs, and streams with quality/performance control
- PDF Integration — Embed barcodes as static images or interactive ButtonField form controls
- Image Customization — Colors, resolution, caption, padding, X-dimension, rotation
- Batch & Export — Multiple barcodes in one operation; XML configuration import/export
Input: Natural language description of a barcode operation
Output: Standalone C# console application (compiles and runs with dotnet run)
Repository Overview
This repository contains 1124 working code examples demonstrating Aspose.BarCode for .NET capabilities.
Statistics (as of 2026-09-09):
- Total Examples: 1124
- Categories: 21
- Overall Pass Rate: 100.0%
- Package Version: Aspose.BarCode 26.8.0
Category Details
barcode-appearance-customization
- Examples: 30
- Guide: agents.md
barcode-checksum-control
- Examples: 30
- Guide: agents.md
barcode-color-customization
- Examples: 28
- Guide: agents.md
barcode-configuration-serialization
- Examples: 30
- Guide: agents.md
barcode-reading-properties
- Examples: 50
- Guide: agents.md
barcode-recognition-basics
- Examples: 75
- Guide: agents.md
barcode-recognition-performance
- Examples: 81
- Guide: agents.md
barcode-recognition-xml-serialization
- Examples: 35
- Guide: agents.md
barcode-saving-and-export
- Examples: 30
- Guide: agents.md
barcode-size-and-resolution
- Examples: 34
- Guide: agents.md
barcode-text-customization
- Examples: 29
- Guide: agents.md
gs1-barcode-types
- Examples: 34
- Guide: agents.md
hibc-lic-barcode
- Examples: 35
- Guide: agents.md
mailmark-four-state-barcode
- Examples: 29
- Guide: agents.md
mailmark-two-dimensional-barcode
- Examples: 34
- Guide: agents.md
maxicode-barcode
- Examples: 34
- Guide: agents.md
one-dimensional-barcode-types
- Examples: 126
- Guide: agents.md
postal-barcode-types
- Examples: 90
- Guide: agents.md
special-barcode-recognition-settings
- Examples: 48
- Guide: agents.md
swiss-qr-code
- Examples: 28
- Guide: agents.md
two-dimensional-barcode-types
- Examples: 214
- Guide: agents.md
Boundaries
Always
Use using blocks for IDisposable objects
using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128, "12345"))
{
generator.Save("barcode.png");
}Use Aspose.Drawing instead of System.Drawing
using Aspose.Drawing;
using Aspose.Drawing.Imaging;
// WRONG: using System.Drawing;Never use EncodeTypes as a variable or parameter type
BaseEncodeType barcodeType = EncodeTypes.Code128;
// WRONG: EncodeTypes barcodeType = EncodeTypes.Code128;Always use the Barcode sub-object for barcode-specific parameters
generator.Parameters.Barcode.XDimension.Pixels = 2f;
generator.Parameters.Barcode.BarHeight.Pixels = 50f;
generator.Parameters.Barcode.Padding.Left.Point = 5f;
// WRONG: generator.Parameters.XDimension.Pixels = 2f;Use correct path for border properties
generator.Parameters.Border.Color = Aspose.Drawing.Color.Black;
generator.Parameters.Border.Width.Pixels = 2f;
// WRONG: generator.Parameters.BorderColor = Color.Black;Never
- Never use
System.Drawing— always useAspose.Drawing - Never use
EncodeTypesas a variable, field, or parameter type — useBaseEncodeType - Never call
Environment.Exit(1)— useConsole.WriteLinefor failure reporting - Never use
generator.Parameters.BorderColororgenerator.Parameters.BorderWidth - Never use
generator.Parameters.Padding.*— usegenerator.Parameters.Barcode.Padding.* - Never use
generator.Parameters.XDimension— usegenerator.Parameters.Barcode.XDimension - Never use
reader.BarcodeSettings.QualitySettings— usereader.QualitySettingsdirectly - Never use
result.IsCodeTextValid— it does not exist onBarCodeResult - Never use
DeconvolutionMode.Disabled— useDeconvolutionMode.Fast
Repository Structure
agents.md
index.json
+-- barcode-appearance-customization/
+-- barcode-checksum-control/
+-- barcode-color-customization/
+-- barcode-configuration-serialization/
+-- barcode-reading-properties/
+-- barcode-recognition-basics/
+-- barcode-recognition-performance/
+-- barcode-recognition-xml-serialization/
+-- barcode-saving-and-export/
+-- barcode-size-and-resolution/
+-- barcode-text-customization/
+-- gs1-barcode-types/
+-- hibc-lic-barcode/
+-- mailmark-four-state-barcode/
+-- mailmark-two-dimensional-barcode/
+-- maxicode-barcode/
+-- one-dimensional-barcode-types/
+-- postal-barcode-types/
+-- special-barcode-recognition-settings/
+-- swiss-qr-code/
+-- two-dimensional-barcode-types/Category Index
| Category | Examples | Pass Rate | Details |
| Barcode Appearance Customization | 30 | 100.0% | agents.md |
| Barcode Checksum Control | 30 | 100.0% | agents.md |
| Barcode Color Customization | 28 | 100.0% | agents.md |
| Barcode Configuration Serialization | 30 | 100.0% | agents.md |
| Barcode Reading Properties | 50 | 100.0% | agents.md |
| Barcode Recognition Basics | 75 | 100.0% | agents.md |
| Barcode Recognition Performance | 81 | 100.0% | agents.md |
| Barcode Recognition XML Serialization | 35 | 100.0% | agents.md |
| Barcode Saving and Export | 30 | 100.0% | agents.md |
| Barcode Size and Resolution | 34 | 100.0% | agents.md |
| Barcode Text Customization | 29 | 100.0% | agents.md |
| GS1 Barcode Types | 34 | 100.0% | agents.md |
| HIBC LIC Barcode | 35 | 100.0% | agents.md |
| Mailmark Four State Barcode | 29 | 100.0% | agents.md |
| Mailmark Two Dimensional Barcode | 34 | 100.0% | agents.md |
| MaxiCode Barcode | 34 | 100.0% | agents.md |
| One Dimensional Barcode Types | 126 | 100.0% | agents.md |
| Postal Barcode Types | 90 | 100.0% | agents.md |
| Special Barcode Recognition Settings | 48 | 100.0% | agents.md |
| Swiss QR Code | 28 | 100.0% | agents.md |
| Two Dimensional Barcode Types | 214 | 100.0% | agents.md |
Command Reference
dotnet new console -n ExampleProject --framework net10.0
dotnet add package Aspose.BarCode
dotnet build --configuration Release --verbosity minimal
dotnet runProject File (.csproj)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aspose.BarCode" Version="26.8.0" />
</ItemGroup>
</Project>Common Error Codes
| Code | Meaning | Fix |
CS0721 | Static type used as parameter | Use BaseEncodeType instead of EncodeTypes |
CS1061 | Member does not exist on type | Verify property path; check Aspose.BarCode docs |
CS0246 | Type or namespace not found | Add missing using; use Aspose.Drawing not System.Drawing |
CS1674 | Type not IDisposable | Remove using from non-disposable types |
<!-- AUTOGENERATED:START -->Updated: 2026-09-09 | Examples: 1124 | Categories: 21 | Package: Aspose.BarCode 26.8.0
<!-- AUTOGENERATED:END -->This repository is maintained by automated code generation. Last updated: 2026-09-09 | Total examples: 1124
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.

