Which one is more acceptable (best) ?:
namespace NP public static class IO public static class Xml ... // extension methods using NP; IO.GetAvailableResources ();
against
public static class NP public static class IO public static class Xml ...
Also for #2 , the code size is controlled using partial classes, so each nested class can be in a separate file, the same for extension methods (except that there is no nested class for them)
I prefer #2 for two reasons, such as the ability to use type names that are already commonly used, such as IO , which I don't want to replace or collide with.
Which one do you prefer? Any pros and cons for everyone? What is the best practice for this case?
EDIT: Will there also be a performance difference between the two?
source share