monodevelop - C# not outputting to console -
i'm sure there's simple answer, none of other stack overflow posts has helped me. code not log console, , it's hard useful state of affairs.
using system; using system.diagnostics; namespace learning { class mainclass { public static void main (string[] args) { debug.log ("this?"); debug.print ("how this?"); console.writeline ("work"); console.readline (); } } }
i've been able write console before, don't know why it's being persnickety now.
probably because code doesn't compile. log()
static method of debugger, not debug, , takes 3 arguments: level, category, , message.
public static void main (string[] args) { system.diagnostics.debugger.log(1, "category", "this?"); system.diagnostics.debug.print ("how this?"); console.writeline ("work"); console.readline (); }
it's worth noting debug/debugger methods not unless debugging. start debugging session in mono, go run -> debug
Comments
Post a Comment