While I was watching a tutorial video about Csharp async and await concepts, I encountered the Dump() method for the first time. The instructor used this method as follows:
public string BoilWater()
{
"Start the kettle".Dump();
"Waiting for the kettle".Dump();
"Kettle finished boiling".Dump():
return water;
}
And here is the output for this code:
Start the kettle
Waiting for the kettle
Kettle finished boiling
Although I'm a newbie in Csharp, I already have some knowledge about the LINQ from reading the book Programming C# 5.0 and I worked a little bit with LINQPad. And I have done some search about it, but to be honest I couldn't find much about Dump() method. So, here is my question, could we just use the Console.WriteLine for creating this output? What is the advantage of using Dump() over Console.WriteLine here?