-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: vipul_vips
Message 3 in Discussion

Hi,

Use EventLog instead of Eventlog at (please note the case)
Eventlog evt = new EventLog("MyLog");

Regards,
Vipul Patel
MS Community Star
Manager- barodausergroup at http://groups.msn.com/BarodaUserGroup

-----Original Message-----
From: BalajiKrishnan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 17, 2004 1:18 PM
To: BDOTNET
Subject: Error in class file -give me solution


-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: BalajiKrishnan
Message 1 in Discussion


Hi All.
This is myerrorhandler.cs file code.when i run the application it is giving
me the error...
"The type or namespace name "Eventlog" could not be found(Are you missing a
using directive or assembly reference?)"
How can i solve this..
Code
using System;
using System.Diagnostics;
namespace Datavision.component
{
/// <summary>
/// Summary description for MyErrorHandler.
/// </summary>
public class MyErrorHandler
{

Eventlog evt = new EventLog("MyLog");
TraceListener MyListener = new EventLogTraceListener(evt);
public MyErrorHandler()
{
//
// TODO: Add constructor logic here
//

evt.Source = "Error Output";
Trace.Listeners.Add( MyListener);
Trace.AutoFlush = true;
}
public void WriteLog( Exception myex)
{
Trace.WriteLine(myex.Source);
Trace.WriteLine( myex.Message);
}
public void CloseLog()
{
Trace.Close;
}

}
}

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your
E-mail Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On
the pre-addressed e-mail message that opens, simply click "Send". Your
e-mail address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to