I get the following error. I did some searching and found out that I can solve this with Tuple
. However, I am already returning Task<Country>
from my function. In my code the out parameter returns out List<Dictionary<string, int>>
. How can I alter my code so it also outs out List<Dictionary<string, int>>
without affecting the existing functionality of the function. Help.
Suppression State Error Async methods cannot have ref or out parameters
public async Task<Country> GetCountriesAsync(int countryId, ICollection<People> peeps, out List<Dictionary<string, int>> PresidentList)
{
Dictionary<string, int> presi= new Dictionary<string, int>();
presi.Add("presi", 1);
PresidentList.Add(presi);
}