Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
1 4 3
~16k people reached

  • 0 posts edited
  • 0 helpful flags
  • 7 votes cast
comment Why the question “give five things you hate about C#” is so difficult to answer during an interview?
I guess many people simply really like C# and consider it to be the best mainstream language. If you compare C# to Java, C, C++, Python, PHP, VB, the number of useful language features is extraordinary. All the things you mentioned are only small flaws (or not flaws at all). "The lack of support for units of measure" - do you really hate c# for that?
comment Should one check for null if he does not expect null?
@MichaelEdenfield: I don't think that counts as real handling according to the given question (our goal is not to make your code work no matter what). To be honest, I often forget to write appropriate block that will throw if null is passed. However, I consider throwing NullArgumentException to be the best practice and the worst practice in my opinion is writing code that cannot handle null but instead of throwing exception returns e.g. another null as a method result (or empty string, or empty collection, or -1, or skips method execution if return type is void, etc.).
comment Should one check for null if he does not expect null?
I hope you meant: Fail early, fail fast, not often...