c# example synced to the current version, and tested