Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A value from which a property name cannot be inferred has been included in the initializer list of an anonymous type declaration without being assigned to a property name.
' Not valid.
' Dim anon1 = New With {.grade = 100, 95}
Error ID: BC36576
To correct this error
Provide a property name for each value in the initializer list, as shown in the following code:
Dim anon2 = New With {.grade1 = 100, .grade2 = 95}
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.