[英]Convert VBscript to VB.Net or C#.net
Is there any tool to convert VBscript code to VB.net Code or C#.net? 有什么工具可以将VBscript代码转换为VB.net代码或C#.net?
this is the sample code I want to convert it 这是我要转换的示例代码
Dim googleTime, googleDt, googleScheme
googleTime = DateDiff("s", "01/01/1970 00:00:00", Now())
googleDt = (1000 * googleTime) + Round(1000 * (Timer - Int(Timer)))
googleScheme = "http://"
googleUserAgent = Server.URLEncode(Request.ServerVariables("HTTP_USER_AGENT"))
If StrComp(Request.ServerVariables("HTTPS"), "on") = 0 Then googleScheme = "https://"
for example Timer in VBscript I did not find any equivalent in VB.Net Please advice. 例如在VBscript中的Timer我在VB.Net中找不到任何等效项,请指教。
"The Timer function returns the number of seconds, and milliseconds, since 12:00 AM." “ Timer函数返回自12:00 AM以来的秒数和毫秒数。”
http://www.w3schools.com/vbscript/func_timer.asp http://www.w3schools.com/vbscript/func_timer.asp
DateTime.Now.Subtract(DateTime.Today).TotalMilliseconds
is the equivalent. 是等效的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.