I searched, but only saw some code for java.

How can this be done in C#?
Thanks!!