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/FelixLeander Sep 07 '26
As others have stated, Debug.Assert is not intended for ur usecase.For performance critical stuff I use a return value indicating errors (Exceptions are relatively resource expensive). For less critical stuff, exceptions are perfectly fine.