beloww is my interface
public interface IMyInterface
{
public Task<IApiResponseItem<T>> MyMethodt<T>(string inp1, string inp2,
string inp3="SqlKey", ApiMethod method = ApiMethod.Get,
TimeSpan? timeout = null) where T : new();
}
and implementation
public async Task<IApiResponseItem<T>> MyMethodt<T>(string inp1, string inp2,
string inp3="SqlKey", ApiMethod method = ApiMethod.Get,
TimeSpan? timeout = null) where T : new();
{
}
below is the call
var iApiResponse = await _resilentApi.MyMethodt(inp1, inp2, "SqlKey", ApiMethod.Get, timeout);
but, i always receiving error as
The type arguments for method 'IMyInterface.MyMethodt(string, string, string, ApiMethod, TimeSpan?)' cannot be inferred from the usage. Try specifying the type arguments explicitly.