First of all, look in your existing source code to find out where ROTATE(...) is used. You should find that the variables g and tau are either constants, globals or locals that are already defined.

So once you understand what's really going on, you can write an equivalent method in C# that does what you want. The method could be static depending on whether you pass in all the data required or if some of the data is from a class field.