Tagged Questions
3
votes
3answers
704 views
Why use sealed instead of static on a class?
Our system has several utility classes.
Some people on our team use (A) a class with all-static methods and a private constructor.
Others use (B) a class with all-static methods (these the juniors).
...
21
votes
9answers
3k views
Is catching general exceptions really a bad thing?
I typically agree with most code analysis warnings, and I try to adhere to them. However, I'm having a harder time with this one:
CA1031: Do not catch general exception types
I understand the ...
2
votes
2answers
219 views
Are there any good tools to help implement or enforce the proper equals and hashcode patterns for c#?
A very common bug on my development team is forgetting to, or incorrectly overriding equals and hashcode.
While the pattern is simple, there's a lot of boilerplate code that goes into doing this ...