3 ms·
Top Mistakes that C# Programmers Make
- xster 12y agoVery misleading title. It should be called "My personal opinions on top mistakes that C# programmers make". There's otherwise, no data, no study, no reference on what's actually the top mistakes that C# programmers make.
- deleted 12y ago[deleted]
- junto 12y ago11. Not buying Resharper. On a separate note I much prefer the lambda style Linq to the SQL style. I think it easier to work with, but I'm not sure why. With regard to classes versus structs. I rarely use structs. What are the real world use cases for them over classes?
- mattchamb 12y agoI think a real world use case for structs is for avoiding allocating objects in performance critical code [1] - though I'm not sure it is required in the vast majority of code. [1] http://stackoverflow.com/questions/22894877/avoid-allocations-in-compiler-hot-paths-roslyn-coding-conventions http://stackoverflow.com/questions/22894877/avoid-allocation...
- yareally 12y agoWhen I was learning C++, it was conveyed that structs were more for combining like data that didn't necessarily require a class because it had a bit less overhead. An example would be a lot of variables that are related, but have no methods (such as a creating a node data structure for making an implementation of a linked list or tree). Though the above was related to C++, that's generally when I use structs for C# as well.
- deleted 12y ago[deleted]