Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
1) Include a C# 6 style using statement like `using System.Math;` in your source
Compilation succeeds. You can then use `Min` (for example) without having to prefix `Math.`. This works in Mono 3.12.
error CS0138: A `using' directive can only be applied to namespaces but `System.Math' denotes a type. Consider using a `using static' instead
I'm using mono master (bc13a8125e5efe020eafe42560302ff4f42f5557).
The spec has changed, Correct syntax is "using static Foo;"
Mea culpa. I'll go actually learn C# 6 now...
FWIW, `using static System.Math;` is not working in the REPL in master:
csharp> using System.Math;
(1,2): error CS0138: A `using' directive can only be applied to namespaces but `System.Math' denotes a type. Consider using a `using static' instead
/Users/sandy/mono-prefix/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
csharp> using static System.Math;
(1,7): error CS1525: Unexpected symbol `static', expecting `('
REPL issues is fixed in master