2
我已經創建了下面的遞歸lambda表達式不會編譯,給錯誤「OpenGlobal」的VB遞歸LAMBDA子不編譯
類型不能從含有「OpenGlobal」的表達式推斷。
Dim OpenGlobal = Sub(Catalog As String, Name As String)
If _GlobalComponents.Item(Catalog, Name) Is Nothing Then
Dim G As New GlobalComponent
G.Open(Catalog, Name)
_GlobalComponents.Add(G)
For Each gcp As GlobalComponentPart In G.Parts
OpenGlobal(gcp.Catalog, gcp.GlobalComponentName)
Next
End If
End Sub
是我想要做的事情嗎?