I getting error CS1660 with Dropdown

How can i fix it. When i write event change then error .

I still comment this one

 void onSelectType(object values)
        @* var DocNo = obj is IEnumerable<object> ? string.Join(", ", (IEnumerable<object>)obj) : obj; *@

error CS1660: Cannot convert lambda expression to type 'bool' because it is not a delegate type

When i remove change event program can run nomally.

Try with

Change="args => onSelectType(args)" or Change="onSelectType(args)"
. The Blazor parser sometimes does not recognize @ in such inline cases.

1 Like