ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Return List from Async Method using C# in .Net<p>Refer below code.</p> <pre class="brush: csharp">public static async Task&lt;List&lt;InstaMedia&gt;&gt; PullUserPosts(string userToscrape) { user = new UserSessionData(); user.UserName = username; user.Password = password; var delay = RequestDelay.FromSeconds(0,0); api = InstaApiBuilder.CreateBuilder() .SetUser(user) .UseLogger(new DebugLogger(LogLevel.Exceptions)) .SetRequestDelay(delay) .Build(); var loginRequest = await api.LoginAsync(); if (loginRequest.Succeeded) { } IResult&lt;InstaUser&gt; userSearch = await api.GetUserAsync(userToscrape); Console.WriteLine($&#34;USER: {userSearch.Value.FullName}\n\tfollowers: {userSearch.Value.FollowersCount} \n\tverified: {userSearch.Value.IsVerified} &#34;); IResult&lt;InstaMediaList&gt; media = await api.GetUserMediaAsync(userToscrape, PaginationParameters.MaxPagesToLoad(5)); List&lt;InstaMedia&gt; mediaList = media.Value.ToList(); return mediaList; }</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/154637/Return-List-from-Async-Method-using-C-in-Net/https://www.aspforums.net:443/Threads/154637/Return-List-from-Async-Method-using-C-in-Net/Thu, 19 Sep 2019 04:38:37 GMT