C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !



Posted By: Ajay Gupta       Member Level: Silver       Posted Date: 16 Apr 2008       Category: Other

XML



QUESTION 1
You are creating a .NET Remoting object. You want to add code to the object to log error messages and
warning messages. You want the log messages written to both a log file and to the Windows application log.
Which code segment should you use?


Select Answer:

EventLog eventLog = new EventLog("testkobj");FileStream fileLog = File.Create("testkobj.log";Trace.WriteLine(eventLog, "sample message");Trace.WriteLine(fileLog, "sample message");
EventLog eventLog = new EventLog("testkobj");FileStream fileLog = File.Create("testkobj.log");Trace.Write(eventLog);Trace.Write(fileLog);Trace.WriteLine("sample message");
Trace.Listeners.Add(newEventLogTraceListener("testkobj"));Trace.Listeners.Add(new TextFileTraceListener("testkobj.log"));Trace.WriteLine("sample message");Trace.WriteLine("sample message");Trace.WriteLine("sample message");Trace.WriteLine("sample message")





      
Your Test Score: 0 / 0



Next Question: What is difference Between Struct and Class?
Previous Question: XML
Related Questions:
  • Which would JavaScript assign to an uninitialized array element?


  • What is the correct HTML for inserting an image?


  • Choose the read-only property:


  • An array declared as int exforsys[100]; The first element of the array is in


  • Choose the built-in object:


  • Categories

    ASP.NET C# VB.NET 
    .NET Framework SQL Server Other 

    Submit Interview/Test Questions with Answers and make money from adsense revenue sharing program

    Want to prepare for an interview? Try our aptitude tests and standard interview questions first.


    dotNet Slackers   BizTalk Adaptors    Web Design

    doors in nj

    Contact Us    Privacy Policy    Terms Of Use