C# Form Application, (log writer problem)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobido
    New Member
    • Feb 2008
    • 13

    C# Form Application, (log writer problem)

    the following code was used in a console application (where it worked). Now iam using it as a windows form app. and it doesnt seem to write anything in the log.

    Code:

    private void Test_Click(obje ct sender, EventArgs e)
    {
    FileInfo l = new FileInfo("Log.t xt");
    StreamWriter Log = l.CreateText();
    Log.Flush();
    try
    {
    Log.WriteLine(" Hello World iam there =D");
    }
    catch (Exception)
    {
    Log_screen("Who ops test failed, (dammit)!");
    }
    finally
    {
    Log.Flush();
    Log_screen("Not hing went wrong will it work?");
    }

    Thx in Advance!
  • bobido
    New Member
    • Feb 2008
    • 13

    #2
    I managed to do so,... =)

    Comment

    Working...