Um. The fragment you show is trivial - and just a fragment. So I'll show you how to do the bits you show, and let you get on with it.
VB:
Dim ret As Long
C#:
long ret;
See what I mean? Trivial...
VB:
Set myEtabs = CreateObject("CSI.ETABS.API.ETABSObject")
C#:
myEtabs = CreateObject("CSI.ETABS.API.ETABSObject");
Trivial.
If you can't cope with changes like that, then you really, really, shouldn't be trying to use code from a different language, or you need to learn at least the basics of the language you are converting from.
Because although there are online converters -
http://www.developerfusion.com/tools/convert/vb-to-csharp/[
^] for example - they do need some checking when it gets complicated.