I have looked over previous postings on this topic but I have not seen any solutions to this particular issue.
First, here is the working c# code:
pri