Why is DateTime a structure in .Net?
问题 Why is DateTime a structure instead of an inheritable class? (I would like to be able to override the ToString() method but I can't.) 回答1: Probably because it was seen as a small, simple and immutable data structure, much like an integer or decimal. Making it a struct under these conditions make using a DateTime very efficient. If it had been made a class, this efficiency benefit would have been lost because that would require memory allocations every time you create a new DateTime. Besides,