4 ms·
You're mistaken, kinda. The syntax wasn't originally "using static", it's just "using" but with a qualified class name instead of a namespace name. The exampl
by electroly 12y ago
You're mistaken, kinda. The syntax wasn't originally "using static", it's just "using" but with a qualified class name instead of a namespace name. The example includes:
using System.Math;
System.Math is a static class, not a namespace. It doesn't import a single static method, it imports the entire class.
However, in the italicized note, you can see they changed their minds after releasing the preview. It's going to be "using static", but they didn't update the example. It will still operate on the entire class and not an individual method though.
- alkonaut 12y agoAh my bad I was looking for an explicit "using static" & forgot math is a static class and not a ns.