DefaultTraceListener.Write(String) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Çıktıyı işleve OutputDebugString
ve yöntemine Log(Int32, String, String) yazar.
public:
override void Write(System::String ^ message);
public override void Write (string? message);
public override void Write (string message);
override this.Write : string -> unit
Public Overrides Sub Write (message As String)
Parametreler
- message
- String
ve Log(Int32, String, String)öğesine yazacak OutputDebugString
ileti.
Örnekler
Aşağıdaki kod örneği bir işlevin sonuçlarını biçimlendirer ve iletisinin Write(String) ilk bölümünü öğesine DefaultTraceListeneryazmak için yöntemini kullanır.
// Compute the next binomial coefficient.
// If an exception is thrown, quit.
decimal result = CalcBinomial(possibilities, iter);
if (result==0) {return;}
// Format the trace and console output.
string binomial = String.Format("Binomial( {0}, {1} ) = ", possibilities, iter);
defaultListener.Write(binomial);
defaultListener.WriteLine(result.ToString());
Console.WriteLine("{0} {1}", binomial, result);
' Compute the next binomial coefficient.
' If an exception is thrown, quit.
Dim result As Decimal = CalcBinomial(possibilities, iter)
If result = 0 Then Return
' Format the trace and console output.
Dim binomial As String = String.Format( _
"Binomial( {0}, {1} ) = ", possibilities, iter)
defaultListener.Write(binomial)
defaultListener.WriteLine(result.ToString)
Console.WriteLine("{0} {1}", binomial, result)
Açıklamalar
Win32 OutputDebugString
hata ayıklama işlevi hakkında bilgi için Platform SDK veya MSDN'de "OutputDebugString" bölümüne bakın.
Şunlara uygulanır
Ayrıca bkz.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin