是否有任何工具可以将VBscript代码转换为VB.net代码或C#.net?
这是我要转换它的示例代码
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://"
例如VBscript中的 Timer 我在VB.Net中找不到任何等价物 请指教。
答案 0 :(得分:0)
“Timer函数返回自上午12:00起的秒数和毫秒数。”
http://www.w3schools.com/vbscript/func_timer.asp
DateTime.Now.Subtract(DateTime.Today).TotalMilliseconds
是等效的。