score:18
the function expects a list(of manufacturer) return type, not an ienumerable(of manufacturer), so adding a .tolist() to the return value should fix it:
return allmfrs.except(unavailablemfrs).tolist()
score:3
your function is declared as returning list(of manufacturer), but your return statement is returning only an ienumerable(of manufacturer). change the return statement to:
return allmfrs.except(unavailablemfrs).tolist()
if you turn option strict on, i believe vb will catch this kind of error at compile time, instead of blowing up at runtime.
score:3
the problem is that enumerable.except returns ienumerable<t>
, but your return type is list(of t)
.
change your last line to:
return allmfrs.except(unavailablemfrs).tolist()
Source: stackoverflow.com
Related Query
- LINQ throwing invalid cast exception on a bigint
- LINQ Source Code Available
- List sum too large, throwing overflow exception
- Linq to SharePoint throwing null reference exception
- .NET 4 Code Contracts: "requires unproven: source != null"
- .ToList throwing exception
- .Except<T> is throwing an Exception
- Exception in System.Data.Entity.dll but was not handled in user code
- LINQ group by day of the week throwing exception
- creating Linq to sqlite dbml from DbLinq source code
- LINQ throwing Query nested too deeply exception
- Linq ThenBy() throwing "The best overloaded method match ThenBy() for has some invalid arguments" exception
- entity exception was unhandled by user code
- Using linq for validation/ throwing exception
- Nested LINQ Method throwing a `Not Supported...` Exception
- NHibernate LINQ Where and Any throwing exception
- Linq joins throwing exception
- An exception of type 'System.ArgumentException' occurred in EntityFramework.dll but was not handled in user code
- c# linq with group by and join throwing exception
- Null reference exception in my LINQ to XML code
- C# Converting List throwing exception in linq query
- FirstOrDefault throwing exception instead of null
- Throwing exceptions from Linq Query exception
- source code for LINQ 101 samples
- Azure server throwing exception after certain numbers of API call
- Data Binding DataGridView to ComboBox Throwing Null Value Exception
- Trouble with a LINQ 'filter' code throwing an error
- LINQ Entity Framework query not working in EF Core, throwing exception
- Exception when changing data source to SQL
- LINQ NotSupportedOperation exception with Code First
More Query from same tag
- multiple Orderby and Sort
- Why does hard coding a function expression speed up query by four minutes?
- C# Syntax From String
- Linq query returns unwanted results as well
- Optimizing Linq Query
- Task fired again after WaitAll
- Select bottom N from Generic List
- String split to object with Linq?
- Write a linq expression to select a subtree of items
- Split String into jagged array looplessly
- How to group by on result of LINQ group by
- how to update record with linq
- custom string sorter
- c# linq rather complex sorting
- Using Linq to SQL to Check Table Privileges of Current User
- mixing database and object query in linq and provide paged results
- Linq select values from multiple lists inside a list
- Linq: Sum() non-integer values
- Linq select statement not working after grouping
- How to load varbinary(max) fields only when necessary with ADO.NET Entity Framework?
- Consuming Service Operations of an ADO.NET Data Service from a .NET Client
- how to order asc/dsc with lambda or linq
- number of child with max parent id with linq and c#
- Using Linq Select to create a list that contains more items than the original list
- DbContext timeout while running linq query
- how to compare null in join linq syntax
- How to sort a List collection of classes with properties in them?
- Find a if filename does not exist in array of variable names
- Filtering include items in LINQ and Entity Framework
- Linq late binding confusion