You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
The JS "console" object provides much useful functionality which is not currently available in mscorlib. Namely it is possible print objects instead of just strings which could be very useful for debugging. Currently I'm using the following additional methods:
This Firebug library seems like a good solution. The formatting overload methods can cause some confusion though since they are unrelated to the "String.Format" method C# developers are used to.
Still - why us it necessary to use an external class instead of adding a few methods to the built-in one? At the very minimum an overload that accept an object as an argument is necessary as having just a method that accepts a string is very limiting. Most browsers provide means to interactively inspect an object when it is printed to the console.
@JechoJekov yes best is to include it in System.Console instead of having a separate class. My intention was to extend by the use of extension methods but, to my surprise, in C# static classes can't have extension methods.
The JS "console" object provides much useful functionality which is not currently available in mscorlib. Namely it is possible print objects instead of just strings which could be very useful for debugging. Currently I'm using the following additional methods:
There are also some other methods that could be useful like:
group()
groupEnd()
time()
timeEnd()
The text was updated successfully, but these errors were encountered: