How Do I Call an Async Method from a Non-Async Method? [duplicate]
问题 This question already has answers here : How to call asynchronous method from synchronous method in C#? (14 answers) Closed 2 years ago . I have the below method: public string RetrieveHolidayDatesFromSource() { var result = this.RetrieveHolidayDatesFromSourceAsync(); /** Do stuff **/ var returnedResult = this.TransformResults(result.Result); /** Where result gets used **/ return returnedResult; } private async Task<string> RetrieveHolidayDatesFromSourceAsync() { using (var httpClient = new