The following example describes a solution in C#
You can download the complete example from here: Download.