我在c#中有这段代码
void Backup()
{
string constr = "server=localhost;user=root;pwd=qwerty;database=test;";
string file = "C:\\MyDumpFile.sql";
MySqlBackup mb = new MySqlBackup(constr);
mb.ExportInfo.FileName = file;
mb.ExportProgressChanged += new MySqlBackup.exportProgressChange(mb_ExportProgressChanged);
mb.ExportCompleted += new MySqlBackup.exportComplete(mb_ExportCompleted);
timerRead.Start();
mb.Export();
}
当转换为VBNet
Private Sub Backup()
Dim constr As String = "server=localhost;user=root;pwd=qwerty;database=test;"
Dim file As String = "C:\MyDumpFile.sql"
Dim mb As New MySqlBackup(constr)
mb.ExportInfo.FileName = file
mb.ExportProgressChanged = mb.ExportProgressChanged + New MySqlBackup.exportProgressChange(mb_ExportProgressChanged)
mb.ExportCompleted = mb.ExportCompleted + New MySqlBackup.exportComplete(mb_ExportCompleted)
timerRead.Start()
mb.Export()
End Sub
我总是收到这个错误
“exportProgressChange”是“MySql.Data.MySqlClient.MySqlBackup”中的一种类型,不能用作表达式。
我在这里想念什么?