I have a vb.net forms program that I would like to use a c# function I use in another program. I used one of the c# to vb.net converters, but still have a problem.
The C# code is:
string[] computer_name = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' });
The VB.net code convertison is:
Dim computer_name As String() = System.Net.Dns.GetHostEntry(Request.ServerVariables("remote_addr")).HostName.Split(New [Char]() {"."C})
The problem is is get an error in the "Request.ServerVariables" that states "Request is not declared. It may be inaccessible due to it protection level".
I made sure I was using the same Using/Imports, but that hasn't cleared up the problem.
Would appreciate any help in resolving this problem.
The C# code is:
string[] computer_name = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' });
The VB.net code convertison is:
Dim computer_name As String() = System.Net.Dns.GetHostEntry(Request.ServerVariables("remote_addr")).HostName.Split(New [Char]() {"."C})
The problem is is get an error in the "Request.ServerVariables" that states "Request is not declared. It may be inaccessible due to it protection level".
I made sure I was using the same Using/Imports, but that hasn't cleared up the problem.
Would appreciate any help in resolving this problem.