I want to create a custom method that will work when added after “Console” in c#. It would be sort of similar to Console.WriteLine()
.
It would look something like this: Console.PrintMyName()
. And when it is called, it would do this: Console.WriteLine(“James”)
.
Is there some way to do this by defining a function that only works as a method when put after after “Console”.