chuang4630
asked on
Question on delegate Func<CustType, string, string, byte[]>
The VS2012 (.NET 4.5) compiler complains the following code:
public Func<CustType, String, String, byte[]> TokenServiceImpl { get; set; }
SomeType GetToken(CustType c, String server, string app, out byte[] key)
{
if (TokenServiceImpl == null) {throw new exception("xxxxx");
// This is the line where it gets compiler error
return TokenServiceImpl (c, server, app, out key);
}
Error: Delegate "Func" does not take 4 arguments.
I have spend quite some on it but still cannot figure it out.
Can someone offer any suggestion? Big thanks in advance.
public Func<CustType, String, String, byte[]> TokenServiceImpl { get; set; }
SomeType GetToken(CustType c, String server, string app, out byte[] key)
{
if (TokenServiceImpl == null) {throw new exception("xxxxx");
// This is the line where it gets compiler error
return TokenServiceImpl (c, server, app, out key);
}
Error: Delegate "Func" does not take 4 arguments.
I have spend quite some on it but still cannot figure it out.
Can someone offer any suggestion? Big thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.