M
Michael Rodriguez
Can anyone please translate the following VB.NET code to C# for me?
Imports System.Net
Public Class NoKeepAliveHttpWebRequestCreate
Implements IWebRequestCreate
Overridable Overloads Function Create(ByVal uri As Uri) As WebRequest
Implements IWebRequestCreate.Create
Dim wr As HttpWebRequest
Dim s As String
' strip the 'x' from the beginning of the url so the normal Http protocol is
used
s = uri.ToString.Substring(1)
wr = WebRequest.Create(New Uri(s))
wr.KeepAlive = False
Return wr
End Function
End Class
Thanks!
Mike Rodriguez
Imports System.Net
Public Class NoKeepAliveHttpWebRequestCreate
Implements IWebRequestCreate
Overridable Overloads Function Create(ByVal uri As Uri) As WebRequest
Implements IWebRequestCreate.Create
Dim wr As HttpWebRequest
Dim s As String
' strip the 'x' from the beginning of the url so the normal Http protocol is
used
s = uri.ToString.Substring(1)
wr = WebRequest.Create(New Uri(s))
wr.KeepAlive = False
Return wr
End Function
End Class
Thanks!
Mike Rodriguez