Attributes cannot be applied to parameters of lambda expressions
You have applied an attribute to a parameter in a lambda expression definition, which is not supported. The following code causes this error.
VB
Sub LambdaAttribute()
' Not valid.
Dim add1 = _
Function(<System.Runtime.InteropServices.InAttribute()> m As Integer) _
m + 1
End Sub
Error ID: BC36634
- Remove the attribute, or consider revising your code by changing the lambda expression to a regular function.
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: