Anonymous type member property '<propertyname>' cannot be used to infer the type of another member property because the type of '<propertyname>' is not yet established
Until the type of an anonymous type property is established, it cannot be used to establish the type of another property. For example, in the following declaration .IDName = .LastName
is not valid because .LastName
has not yet been initialized.
' Not valid.
Dim anon1 = New With {Key .IDName = .LastName, Key .LastName = "Jones"}
Error ID: BC36559
Establish the type of the property before using it to initialize another property.
Dim anon2 = New With {Key .LastName = "Jones", Key .IDName = .LastName}
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.
.NET feedback
.NET is an open source project. Select a link to provide feedback: