I would like to know if there is something like a using System.Console
in C # .
I wanted to do something in the console to remember. When I learned to use the console, I did it with the VB.NET language. There you could import the namespace called System.Console
so as not to repeat the word Console
for all the code.
... and I want to do the same, but I can not find a using
like that in C # .
Example namespace in Visual Basic
'SIN EL ESPACIO DE NOMBRES ("Console." en cada línea del código)
Module Module1
Sub Main()
Console.WriteLine("HOLA")
Console.ReadLine()
End Sub
End Module
'CON EL ESPACIO DE NOMBRES (desaparece el "Console.", lo que quiero en C#)
Imports System.Console
Module Module1
Sub Main()
WriteLine("HOLA")
ReadLine()
End Sub
End Module>
Anyway, what I would like to know is if I have to write the Console.
always in C # , or if there is a way of not doing it.