It is basically the same as c#.

Paste your C# code and we should be able to translate it for you.