(no title)
zvrba | 7 months ago
namespace Math;
static class Adder {
public static int Add(...) { ... }
}
(one nesting level less). Next, elsewhere you can write namespace Whatever;
using static Math.Adder;
class CC {
void M() {
var z = Add(10, 20); // no NS qualification needed due to using static above
}
}
Java enforces directory structure to reflect package names, and this feature is not universally popular.
No comments yet.