निम्नलिखित C # प्रोग्राम (निर्मित csc hello.cs) Hello via Console!कंसोल पर और Hello via OutputDebugStringडीबग व्यू विंडो में प्रिंट करता है। हालाँकि, मैं या तो System.Diagnostics.*कॉल नहीं देख सकता । ऐसा क्यों है?
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" );
}
}
वहाँ शायद कुछ विशेष कमांड लाइन स्विच के लिए आवश्यक है csc?
मैं अपने किसी भी विकास के लिए विजुअल स्टूडियो का उपयोग नहीं कर रहा हूं, यह शुद्ध कमांडलाइन सामान है।