Google Authenticator One-time Password Algorithm in C#

I would like to calculate the OTP password generated via Google Authenticator or similar app in C#. I have found some Javascript implementations and Python but not for C#: http://blog.tinisles.com/...