Extension methods versus inheritance
问题 Are there rules of thumb that help determine which to use in what case? Should I prefer one over the other most times? Thanks! 回答1: Extension methods are useful, but they are harder to discover through the IDE than regular methods, since they are not attached to the original class and there are no clues as to where the code for them might reside. There are some best practice suggestions as to where to put them and how to name them, but these are only guidelines and there is no guarantee that