Aşağıdaki C # programı (ile oluşturulmuş csc hello.cs) yalnızca Hello via Console!konsolda ve Hello via OutputDebugStringDebugView penceresinde yazdırılır . Ancak, System.Diagnostics.*aramaların ikisini de göremiyorum . Neden?
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.Write( "Hello via Debug!" );
System.Diagnostics.Trace.Write( "Hello via Trace!" );
OutputDebugString( "Hello via OutputDebugString" );
}
}
Gerekli olan bazı özel komut satırı anahtarları olabilir cscmi?
Geliştirmelerimden herhangi biri için Visual Studio kullanmıyorum, bu tamamen komut satırı işi.