一小段VB代码转换成C#代码,在线等.
ImportsSystem.WebImportsSystem.Web.ServicesPublicClassMyHandlerImplementsSystem.Web.I...
Imports System.Web
Imports System.Web.Services
Public Class MyHandler
Implements System.Web.IHttpHandler
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "text/plain"
context.Response.Write("Hello World!")
End Sub
ReadOnly Property IsReusable() As Boolean Implements IHttpHandler IHttpHandler.IsReusable
Get
Return False
End Get
End Property
End Class
------------------------------------------------------------------------------------------
Imports System.Web
Imports System.Web.Services
Public Class MyHandler
Implements System.Web.IHttpHandler
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Respanse.AddHeader("Content-Type", "application/x-ms-application")
Dim filePath As String = context.Request.FilePath
filePath = context.Request.MapPath("/Applications/SampleClickOnceApp/SampleClickOnceApp_1_0_0_16.application")
context.Respanse.TransmitFile(filePath)
End Sub
ReadOnly Property IsReusable() As Boolean Implements IHttpHandler IHttpHandler.IsReusable
Get
Return False
End Get
End Property
End Class
转换成C#代码..如果能带上注释就最好了...好的加分.谢谢啦!
好吧..我只要有人能帮我翻译
ReadOnly Property IsReusable() As Boolean Implements IHttpHandler IHttpHandler.IsReusable
Get
Return False
End Get
End Property
这一段就可以了...上面的都不用翻译了...没人帮忙么..T_T 展开
Imports System.Web.Services
Public Class MyHandler
Implements System.Web.IHttpHandler
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "text/plain"
context.Response.Write("Hello World!")
End Sub
ReadOnly Property IsReusable() As Boolean Implements IHttpHandler IHttpHandler.IsReusable
Get
Return False
End Get
End Property
End Class
------------------------------------------------------------------------------------------
Imports System.Web
Imports System.Web.Services
Public Class MyHandler
Implements System.Web.IHttpHandler
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Respanse.AddHeader("Content-Type", "application/x-ms-application")
Dim filePath As String = context.Request.FilePath
filePath = context.Request.MapPath("/Applications/SampleClickOnceApp/SampleClickOnceApp_1_0_0_16.application")
context.Respanse.TransmitFile(filePath)
End Sub
ReadOnly Property IsReusable() As Boolean Implements IHttpHandler IHttpHandler.IsReusable
Get
Return False
End Get
End Property
End Class
转换成C#代码..如果能带上注释就最好了...好的加分.谢谢啦!
好吧..我只要有人能帮我翻译
ReadOnly Property IsReusable() As Boolean Implements IHttpHandler IHttpHandler.IsReusable
Get
Return False
End Get
End Property
这一段就可以了...上面的都不用翻译了...没人帮忙么..T_T 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询