When to use a static helper class vs extension methods
When adding a static class, what criteria do you use to determine if it should be a helper class or an extension class?
For example, I have a recursive hierarchical data structure (has Children list of more of itself) and I want to write methods to help searching and iterating through it.
I could have a helper class like:
public static class TreeNavigation { public static bool NodeExists(Root root, Node node){...}}
public static class TreeNavigation { public static bool NodeExists(Root root, Node node){...}}
or a extension class like:
public static class TreeExtensions { public static bool NodeExists(this Root root, Node node){...}}
public static class TreeExtensions { public static bool NodeExists(this Root root, Node node){...}}