Use the code example below as a guideline for writing Data Matrix barcodes.
C# - Basic steps for barcode writing Data Matrix Barcodes using Accusoft.BarcodeXpress.Net
using (BarcodeXpress bx = new BarcodeXpress("."))
using (WriterDataMatrix dataMatrixWriter = new WriterDataMatrix(bx))
{
// Set the text value
dataMatrixWriter.BarcodeValue = "DataMatrix Value";
using (Bitmap bitmap = dataMatrixWriter.CreateBitmap())
{
bitmap.Save("testfile.bmp");
}
}