Σημείωση
Η πρόσβαση σε αυτή τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να συνδεθείτε ή να αλλάξετε καταλόγους.
Η πρόσβαση σε αυτή τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να αλλάξετε καταλόγους.
You cannot infer an anonymous type member name from a complex expression.
Error ID: BC36556
Example
The following example generates BC36556:
Dim numbers() As Integer = { 1, 2, 3, 4, 5 }
Dim instanceName = New With {numbers(3)}
For more information about sources from which anonymous types can and cannot infer member names and types, see How to: Infer Property Names and Types in Anonymous Type Declarations.
To correct this error
Assign the expression to a member name, as shown in the following code:
Dim numbers() As Integer = { 1, 2, 3, 4, 5 }
Dim instanceName = New With { .number = numbers(3) }