I have a LINQ query to get data from my database:
query.Select(b => b.BooleanValue.Value).Distinct().ToArray();
This query gives me the error
Linq Cannot implicitly convert type 'bool[]' to 'object[]'.
I get the same error with a decimal value but with a text value it all works fine. I searched all over the internet and I only found people that are having problems with object
to bool
.
Do you know how to convert (within a LINQ select
) decimal
to object
?