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: XML
Previous Question: XML
Related Questions:
  • In NetWare, names of hard drives are called volume names


  • what does HTML Stand for?


  • Select which of the following incorrectly describes the structure defined by the following XML Schema.


  • CMMI is an example of


  • Which of the following is not supported by a Web Service?


  • 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