我正在尝试将以下代码转换为vb.net但在线转换器返回错误。请问有谁帮忙吗?
JohnKenedy.BusinessSQLEXPRInstaller _ins = new JohnKenedy.BusinessSQLEXPRInstaller(
"<Installation Display Name>", "localhost",
"<New database instance name>", "<new database name>", "<database password>",
"<database backup filename>");
if (_ins.IsDone == false) _ins.ShowDialog();
if (_ins.IsRestart == true)
{
Application.Exit();
this.Close();
return;
}
答案 0 :(得分:4)
这些代码转换器通常希望您将代码放在类中,而不仅仅是代码存根。
Dim _ins as JohnKenedy.BusinessSQLEXPRInstaller = New JohnKenedy.BusinessSQLEXPRInstaller("<Installation Display Name>", "localhost", "<New database instance name>", "<new database name>", "<database password>", "<database backup filename>")
If _ins.IsDone = False Then _ins.ShowDialog()
If _ins.IsRestart = True Then
Application.Exit()
Me.Close()
End If