閱讀英文

共用方式為


多維陣列不能轉換成運算式樹狀架構

大多數的運算式皆可轉換成運算式樹狀架構,但多維度陣列不能。 例如,下列程式碼會造成此錯誤:

VB
Module Module1  
    Sub Main()  
        '' A multi-dimensional array cannot be converted.  
        'Dim expTree As Expressions.Expression(Of Func(Of Object)) = _  
        '    Function() New Integer(1, 1) {{1, 2}, {2, 3}}  
  
        ' A one-dimensional array can be converted.  
        Dim expTree2 As Expressions.Expression(Of Func(Of Object)) = _  
            Function() New Integer() {1, 2, 3}  
    End Sub  
End Module  

錯誤 ID: BC36603

另請參閱