Cannot convert method group 'startsearch' to non-delegate type 'object'. Did you intend to invoke the method?
See original GitHub issueI get this when calling on a method in @@functions{}
from onclick in an elment. This happens in my web api projects, it’s done exactly the same as in blazor template.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
C# cannot convert method to non delegate type
1. Because you need to call it, eg obj.getTitle() · 1. Have you tried searching the googles? This is a fairly common beginner's...
Read more >Compiler Error CS0428
This error occurs when converting a method group to a non-delegate type, or attempting to invoke a method without using parentheses. Example.
Read more >Cannot convert method group 'x' to non-delegate type 'bool'.
Cannot convert method group 'IsGrounded' to non-delegate type 'bool'. Did you intend to invoke the method? Please help me, how do I fix...
Read more >MVC - Fix Error - CS0428 Cannot convert method ... - YouTube
CS0428: Cannot convert method group 'GetValueOrDefault' to non - delegate type 'bool'. Did you intend to invoke the method ?
Read more >error CS0428: Cannot convert method group 'Bar' to non- ...
error CS0428: Cannot convert method group 'Bar' to non-delegate type 'void*'. Did you intend to invoke the method? ; Project, ReSharper ; Subsystem,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
onclick
should now be@onclick
. We made this syntax change in preview 6 - it’s the final event-handler syntax for the 3.0 release.Thanks @tjorxwrynch for the suggestion!
The good news is that this change has already been made in the latest template source code: https://github.com/aspnet/AspNetCore/blob/master/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Pages/Counter.razor#L7