Question

I have a simple Where clause that filters through a small container class like this:

var _cDetail = _cDetails.Where(c => Convert.ToString(c.ServiceProductId) == _cNumber).FirstOrDefault();

And I have it defined in another project (but included in the other project's references with a "using" statement referring to that project) as a simple class that looks like this:

public class CDetail
{
    public int ProductId { get; set; }
    public int ServiceProductId { get; set; }
}

But I get this error:

Delegate 'System.Func<OtherClass.CDetail,int,bool>' does not take 1 arguments

I see this one in google a lot, but my circumstances seem a lot different.

Where does the obj,int,bool even come from?

No correct solution

OTHER TIPS

Visual Studio couldn't find where the type of this object (CDetail) was declared.

Instead of saying something like, "CDetail is not declared in this context" or something like that, it sent me on a wild goose chase.

I am keeping this question up in case someone else comes across this problem.

Thanks to everyone for the help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top