|
Please help convert the following VB code into C #
2 Dim Ip As String = "61.175.232.30"
3 'Take out the IP address and remove the'. 'String array
4 Dim Ip_List () As String = Ip.Split (".". ToCharArray ())
5 Dim X_Ip As String = ""
6 'loop array, convert data to hexadecimal number, and merge array (3dafe81e)
7 Dim ip As String
8 For Each ip In Ip_List
9 X_Ip + = Convert.ToInt16 (ip) .ToString ("x")
10 Next
11
12 'Convert hexadecimal number to decimal number (1034938398)
13 Dim N_Ip As Long = Long.Parse (X_Ip, System.Globalization.NumberStyles.HexNumber) |
|