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 type argument has been specified in a call to an extension method that either has no generic parameters or has no generic parameters for which a type is not already specified. For example, the following code causes this error.
' The extension method is not generic.
<Extension()> _
Sub Example(ByVal str As String)
' Body of the Sub.
End Sub
Dim str = "hi"
'' The call to Example specifies a type argument.
'' Not valid.
'str.Example(Of String)()
Error ID: BC36907
To correct this error
Add a type parameter to the extension method definition.
Remove the extra type argument from the procedure call.
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.