need help? RRS feed

  • Question

  • User1783026923 posted

    ILogFormatter formtter; EmailMessage msg = new EmailMessage("azwar@lntechnologies.com", "azwar_alam@hotmail.com", "My email", "Test Email by Azee", "mail.lntechnologies.com", 25, "Azwar sending u email", formatter);



    when i passing the last parameter formatter it gives me the error unassigned local variable formatter plz tell me where i m wrong.?

    Monday, January 15, 2007 3:01 AM

All replies

  • User-1583677305 posted

    You must assign reference to object into formatter variable:

    ILogFormatter formatter = new SomeFormatter();


    Monday, January 15, 2007 4:47 AM
  • User1783026923 posted

    can u tell me the exact sample code bcz when i m writing

    ILogFormatter formtter=new FormattedEventLogTraceListener;

    it gives me an error "an explicit conversion exist(are you missing a cast)" 


    Monday, January 15, 2007 7:12 AM
  • User-1583677305 posted

    Try to use  

    ILogFormatter formatter = new TextFormatter();
    Monday, January 15, 2007 7:41 AM
  • User1783026923 posted

    Thanks it is working.But  i need further help i m also working on the wmi trace listener and here it is my code.

    //WmiTraceListener wm = new WmiTraceListener();

    //wm.IndentLevel = 1;

    //wm.IndentSize = 2;


    //wm.Name = "WMI TraceListener";

    //wm.TraceOutputOptions = TraceOptions.Timestamp;


    this code is working fine but i dont know where it is writing.? 


    Monday, January 15, 2007 7:49 AM
  • User-1583677305 posted
    Try to see Microsoft Application Center or Microsoft Operations Manager.
    Monday, January 15, 2007 8:04 AM
  • User1783026923 posted


    Monday, January 15, 2007 8:15 AM