Does C# has feature like Java\'s static imports?
so instead of writing code like
FileHelper.ExtractSimpleFileName(file)
I could wr
C# 6.0 under Roslyn Platform supports Static import. It requires statement like:
using static System.Console;
so the code might look like:
using static System.Console;
namespace TestApplication
{
class Program
{
static void Main(string[] args)
{
WriteLine("My test message");
}
}
}
The earlier planned version for C# 6.0 had static import without static keyword.
For other new features in C# 6.0 see: New Language Features in C# 6