© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
43 replies
Gamingtoday093

✅ async Task throws exception if not explicitly defined

I have been using asynchronous Tasks all over my project to fetch and send data to a database perfectly fine. But for some reason any async Tasks in one database table handler class throws an exception (See Image). I can fix it by explicitly defining Task to be
using Task = System.Threading.Tasks.Task;
using Task = System.Threading.Tasks.Task;
but that doesnt make any sense to me since it uses the exact same using statements as another database handler class which works perfectly fine and Task isnt defined by anything else at all. Just need some help solving this mystery
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

catching an exception in an async Task [Answered]
C#CC# / help
4y ago
Async Task Help
C#CC# / help
2y ago
✅ User defined Exception Handling
C#CC# / help
2y ago
❔ Cancel task on nested exception
C#CC# / help
3y ago