בנימן הגלילי בנימן הגלילי - 6 months ago 65
C# Question

rename a function in C#

is there a way in C# to rename System.Console.WriteLine
so that in my C#/console/visual studio program I could write

//instead of
System.Console.WriteLine("Hello"); //??

What would this be, a class? a namespace? Do I do this in the header or inside of main?


Your target looks strange and there is no way to do this in c#. Alternatively you can add a method in a class and use it.

private static void printf(string value)

Note: above method works only in the class which you write the above method.