namespace System { public static class StringExtensions { public static string Fmt(this string format, params object[] args) { return string.Format(format, args); } } }
If an extension method use some specific parameters, but still is more or less general purpose, put in into the narrowest namespace of method parameters.
And if the method is specific method, put it in the namespace where it will be used. Also it is good to mark this method as 'internal'.
No comments:
Post a Comment