I'm totally new in c#, I wrote my code in VB.NET before but I'm trying to use c# to re-develop my program and as a lesson for learning c#. I tried long time but still can't get a proper conversion from VB.NET to c# , can anyone help me to convert as I will more easier to understand c#, thank you !

This is my code from VB.NET

```
Module GetStaffList

Dim Url As String
Dim CorpID As String
Dim Secret As String
Const ErrCode As String = """errcode"":0,""errmsg"":""ok"""

Function Token(CorpID As String, Secret As String) As String

    CorpID = "wwe1f80304633b3"
    Secret = "Ev7_oVNNbTpzkfcZ_QhX9l0VjZnAQ"

    Dim http = CreateObject("MSXML2.ServerXMLHTTP")
    Url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" & CorpID & "&corpsecret=" & Secret
    http.Open("get", Url, False)
    http.send()

    If http.Status = 200 Then
        Token = http.responseText
    End If

    If InStr(Token, "access_token") > 1 Then
        Token = Split(Token, ",")(2)
        Token = Split(Token, ":")(1)
        Token = Replace(Token, """", "")
        MainPage.TxtToken.Text = Token
    Else
        Token = ""
    End If

End Function

```

And below is what I trying convert to c# but still hard to do 

```
namespace SC_System

```

{
 class MSG
 {
 const string ErrCode = "\"errcode\":0,\"errmsg\":\"ok\"";

```
    public void Token(string CorpID, string Secret)
    {
        var http = CreateObject("MSXML2.ServerXMLHTTP");
        string Url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + PDC.CorpID + "&corpsecret=" + PDC.Secret +"";
        HttpWebRequest GetUrl = (HttpWebRequest)WebRequest.Create(Url);
        HttpWebResponse ResponseUrl = (HttpWebResponse)GetUrl.GetResponse();
        if (ResponseUrl.StatusCode == HttpStatusCode.OK)
        {
            Console.WriteLine(ResponseUrl.StatusDescription);
            ResponseUrl.Close();
        }

    }

    private object CreateObject(string v)
    {
        throw new NotImplementedException();
    }
}

```

}