Why does Console.Out.WriteLine exist?

前端 未结 2 2014
温柔的废话
温柔的废话 2021-02-06 23:21

Actually the question should be why does Console.WriteLine exist just to be a wrapper for Console.Out.WriteLine

I found this little method usin

2条回答
  •  攒了一身酷
    2021-02-06 23:36

    Brad Abrams (The founding member of both CLR and .NET framework at Microsoft) says the following.

    Console.WriteLine() is simply a shortcut for Console.Out.WriteLine. Console was overloaded by WriteLine propery to make that much easier to write.

    Source: Book "The C# Programming Language by Anders Hejlsberg".

提交回复
热议问题