All Comments
TopTalkedBooks posted at August 20, 2017

Bill Wagner has a chapter about this in his book "effective c#" (http://www.amazon.com/Effective-Specific-Ways-Improve-Your/dp/0321245660). He concludes by using the following principle:

  1. Is the main responsability of the type data storage?
  2. Is its public interface defined entirely by properties that access or modify its data members?
  3. Are you sure your type will never have subclasses?
  4. Are you sure your type will never be treated polymorphically?

If you answer 'yes' to all 4 questions: use a struct. Otherwise, use a class.

TopTalkedBooks posted at August 20, 2017

How about Effective C#?

TopTalkedBooks posted at August 20, 2017

I would recommend Effective C# by Bill Wagner (first edition and second edition). He goes through a number of language constructs and techniques and explains which ones are faster and why. He touches on a lot of best practices as well.

More often than not, however, optimizing your algorithm will give you far better results than using any kind of language / optimization technique.

Top Books
We collected top books from hacker news, stack overflow, Reddit, which are recommended by amazing people.