Where does System.Diagnostics.Debug.Write output appear?
问题 The following C# program (built with csc hello.cs ) prints just Hello via Console! on the console and Hello via OutputDebugString in the DebugView window. However, I cannot see either of the System.Diagnostics.* calls. Why is that? using System; using System.Runtime.InteropServices; class Hello { [DllImport("kernel32.dll", CharSet=CharSet.Auto)] public static extern void OutputDebugString(string message); static void Main() { Console.Write( "Hello via Console!" ); System.Diagnostics.Debug