VB的函数拿到C#来用除了问题怎么解决?

先看VB的代码:Dim int1, int2 As Integer

            int1 = InStr(MyHttp.Html, "name=" + Chr(34) + "securityId" + Chr(34))
            int1 = InStr(int1, MyHttp.Html, "value=")
            int1 = InStr(int1, MyHttp.Html, Chr(34)) + 1
            int2 = InStr(int1, MyHttp.Html, Chr(34))
            securityId = Mid(MyHttp.Html, int1, int2 - int1)
            securityId = MyHttp.utf8(securityId)

            int1 = InStr(MyHttp.Html, "name=" + Chr(34) + "_form_token" + Chr(34))
            int1 = InStr(int1, MyHttp.Html, "value=")
            int1 = InStr(int1, MyHttp.Html, Chr(34)) + 1
            int2 = InStr(int1, MyHttp.Html, Chr(34))
            _form_token = Mid(MyHttp.Html, int1, int2 - int1)

然后在看看C#的代码:
 int1 = MyHttp.Html.IndexOf("action=");
                int1 = InStr(int1, MyHttp.Html, Convert.ToChar(34)) + 1;
                int2 = InStr(int1, MyHttp.Html, Convert.ToChar(34));
                action = MyHttp.Html.Substring( int1, int2 - int1);

                int1 = MyHttp.Html.IndexOf( "name=" + Convert.ToChar(34) + "epccGwMsg" + Convert.ToChar(34));
                int1 = InStr(int1, MyHttp.Html, "value=");
                int1 = InStr(int1, MyHttp.Html, Convert.ToChar(34)) + 1;
                int2 = InStr(int1, MyHttp.Html, Convert.ToChar(34));
                epccGwMsg = MyHttp.Html.Substring(int1, int2 - int1);

你这代码是机器自动翻译的?
InStr对应的是IndexOf,你第一个对了,后面的怎么就没有翻译对呢。