문제

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?

올바른 솔루션이 없습니다

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top