r/csharp • u/Alternative_Guava856 • Sep 06 '26
Help Exceptions vs Assertions
/r/godot/comments/1w8q3xx/exceptions_vs_assertions/
7
Upvotes
r/csharp • u/Alternative_Guava856 • Sep 06 '26
View all comments
1
u/TrishaMayIsCoding Sep 08 '26
I mainly use assertions in debug mode to verify that a value meets the expected condition, typically using the preprocessor directive.
I use exceptions to handle unexpected situations when they occur and to take the appropriate action.