ADS communication forms the back bone of any TwinCAT system. It is possible to read and write data from a TwinCAT runtime into a .NET application using the ADS DLL. This project is a collection of examples for the various operations available using the ADS DLL details of which can be found here:
https://infosys.beckhoff.com/content/1033/tc3_ads.net/9407515403.html?id=6770980177009971601
This project currently targets .NET 5 and uses the Beckhoff nuget package Beckhoff.ADS 6.0.129 This can target any TwinCAT version, you simply need to be able to run a TwinCAT project either on a VM or RT HW.
Simply copy the samples you want in your own application.
If you would like to contribute thats great, this is a developing project. if you have any interesting examples, please feel free to add them.
fork the repo, branch make your changes submit a PR