-2

我需要帮助修复New此代码中的问题:

 If (Me.OpenFileDialog1.FileName <> "Open your .ico file") Then
        New EthernalCompiler() With { _
            .Source = Me.txtSource.Text.Replace("3jkf0dks0", Me.txtPanelId.Text), _
            .Target = Target.Console, _
            .References = New String() { "System.dll", "mscorlib.dll", "System.Core.dll" }, _
            .Icon = Me.OpenFileDialog1.FileName _
        }.Compile(Me.txtFileName.Text)
    Else
        MessageBox.Show("Please select an icon", "Icon")
    End If

如果有人能解决这个问题那就太好了:)

4

1 回答 1

1

你可以这样尝试吗:

Dim oCompiler as EthernalCompiler = New EthernalCompiler() With { _
            .Source = Me.txtSource.Text.Replace("3jkf0dks0", Me.txtPanelId.Text), _
            .Target = Target.Console, _
            .References = New String() { "System.dll", "mscorlib.dll", "System.Core.dll" }, _
            .Icon = Me.OpenFileDialog1.FileName _
        }.Compile(Me.txtFileName.Text)

oCompiler.Compile(Me.txtFileName.Text)
于 2013-08-15T16:19:44.957 回答