VB.NET and C# my have different syntax but they both call the same library (the .NET Framework...) to accomplish the same thing.
Please attempt to read through the code above to understand the logic. Once you understand the logic then you should have no problem implementing the same thing in C#.
If you get stuck, ask and I'll help you through whatever you don't understand.
-Frinny
P.S.
The CType function is simply casting the value returned into an Integer.
It's the same thing as this in C#:
- result = (Integer)cmd.Parameters("@ReturnVal").Value;