Public Sub Is_Prime(sender As Object, e As DoWorkEventArgs) Handles BackgroundWorker1.DoWork
我收到错误“未定义类型'DoWorkEventArgs'。”。怎么了?
Public Sub Is_Prime(sender As Object, e As DoWorkEventArgs) Handles BackgroundWorker1.DoWork
我收到错误“未定义类型'DoWorkEventArgs'。”。怎么了?
怎么了?
您可能忘记导入定义类的System.ComponentModel
名称空间。DoWorkEventArgs
您可以将以下语句添加到文件顶部:
Imports System.ComponentModel
或者,如果您不想导入命名空间,则可以完全限定该类:
Public Sub Is_Prime(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork