I am attempting to call a function but the error I am getting is “The best overloaded method match for xxxx has some invalid arguments”. When I hover over it, I get the option to “Generate method stub…”
The code causing the error is:
if (oCustomerDAL.VerifyCustomerLoginID(ref oSubscriber)) { }
The related function is:
public bool VerifyCustomerLoginID(ref IAuthenticate oSystemUser)
How can I resolve the error?
as the method uses the
refkeyword, you need to also provide it when calling the method:(OP omited the
refbefore edit)Edit. You should also check what type
oSubscriberis. Ensure that it implements interfaceIAuthenticateas this is the interface that the method you’re trying to call requires.To do this find the definition of the class for which
oSubscriberis an instance and ensure that it looks something like this (C#)