It is possible to write only WriteLine instead of Console.WriteLine in C#?

Viewed 2942

I'm a completely noob and a begginer programmer in C# but I was reading about Roslyn and 'What's new in C# 7.0' and I found something very interesting that I can't find out the answer I need.

In this link, all the examples given contain something like WriteLine("something"); instead of Console.WriteLine("something");, for example:

public void PrintCoordinates(Point p)
{
  p.GetCoordinates(out int x, out int y);
  WriteLine($"({x}, {y})");
}

My question is: How can I do that?

Would something like this work?

public static void WriteLine(string v) => Console.WriteLine(v);
3 Answers
Related