© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
2 replies
growlingOwl

Exception/NULL/Error handling advice.

DeserializeAsync clearly returns a nullable generic object. From the picture we can clearly see that the content being passed is not going to be null. Still, DeserializeAsync says that it's possible to return a null, because, let me know if I understood this incorrectly, it's possible that it won't be possible to Deserialize the content (even if its not null) into the specified object, thus it then would return null. Is the only way to check this, to then wrap response in a nullability check and then return it if I don't want to return a null from the method using this code?
imgz.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

❔ Null exception
C#CC# / help
3y ago
✅ Exception handling..
C#CC# / help
17mo ago
✅ Exception handling
C#CC# / help
17mo ago
❔ Exception Handling
C#CC# / help
3y ago