I have an interface that looks like this:
Task<CurrencyResponse> credit(string id, string correlationVector = null);
I have a method that takes in this credit function as a function delegate:
protected async Task PerformWalletOperation(Func<string, string, Task<CurrencyResponse>> credit)
{
currencyResponse = await credit(id);
}
However, since my last parameter (correclationVector) is an optional argument, I get a compile error and have to pass in a value. Is there a way around this without me having to call my credit like this:
credit(id, null);