Fail() method

Fail() method from Debug and Trace class send message to TraceListener.


using System;
using System.Diagnostics;
class Program
{
    static void Main()
    {
        Trace.Listeners.Add(new TextWriterTraceListener("trace.txt"));
        Trace.Fail("File data.txt does not exist!");
    }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.