小编LAa*_*nni的帖子

VB.net delegate param array with invoke

I have this code in my Parser and I want to pass text to Form1 so I can update some Labels or whatever. (My structure is as follows: Form1 -> Engine -> Parser) Sometimes I need to pass 2 strings, sometimes more.

Public Class Parser
Public Event NewInfo(<[ParamArray]()> Byval strArray() as String)

Public Sub SomeParser(ByVal m As Match)
Dim strArray() As String = {"Word1", "Word2"}
RaiseEvent NewInfo(strArray)
End Sub

End Class
Run Code Online (Sandbox Code Playgroud)

Then I have this another class. I pass the …

vb.net

1
推荐指数
1
解决办法
6763
查看次数

标签 统计

vb.net ×1