C# Exclusive Interview Questions and Answers (453) - Page 17

  • A joint initiative from DotNetFunda.Com and Questpond.
  • A one stop place on the internet to get trusted and proven Interview Questions (based on more than a decade of experience in this field) to ensure the success of the candidates.
  • You will find almost all Interview questions from Questpond here and this list is growing day by day with all latest and updated interview questions.

453 records found.

Get 650+ Questpond's Interview videos on discount

Can we force the activation of Garbage Collection if yes How?

Yes we can force but its not recommeded to do so.Method is GC.Collect()
Can we overload contructors

Yes, We can have Default Constructor, Parameterised and Copy Contructor in every class
What debugging tools come with the .NET SDK

1.CorDBG – command-line debugger.To use CorDbg, you must compile the original C# file using the /debug switch.
2.DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR.
What does assert() method do

In debug compilation, assert takes in a Boolean condition as a parameter,
and shows the error dialog if the condition is false. The program
proceeds without any interruption if the condition is true.
What’s the difference between the Debug class and Trace class

Documentation looks the same.Use Debug class for debug builds,use Trace class for both debug and release builds.
Why are there five tracing levels in System.Diagnostics.TraceSwitcher

The tracing dumps can be quite verbose.For applications that are
constantly running you run the risk of overloading the machine and the
hard drive. Five levels range from None to Verbose, allowing you to
fine-tune the tracing activities.
How do you debug an ASP.NET Web application

Attach the aspnet_wp.exe process to the DbgClr debugger.
What are three test cases you should go through in unit testing

1.Positive test cases (correct data, correct output).
2.Negative test cases (broken or missing data, proper handling).
3.Exception test cases (exceptions are thrown and caught properly).
Methods in Debug and trace class ___________

NOTE: This is objective type question, Please click question title for correct answer.
The debugging window we use for reverse tracing of functions executed

NOTE: This is objective type question, Please click question title for correct answer.
The debugging window we use to execute some statements in break point mode

NOTE: This is objective type question, Please click question title for correct answer.
How do you handle Start, Pause, Continue and Stop calls from SCM within your application

By implementing OnStart, OnPause, OnContinue and OnStop methods.
How is development of a Windows service different from a Windows Forms application

A
Windows service typically does not have a user interface, it supports a
set of commands and can have a GUI that’s built later to allow for
easier access to those commands.

What does SCM do

SCM is Windows Service Control Manager. Its responsibilities are as follows:
Accepts requests to install and uninstall Windows services from the Windows service database.

To start Windows services either on system startup or requested by the user.

To enumerate installed Windows services.

To maintain status information for currently running Windows services.

To transmits control messages (such as Start, Stop, Pause, and Continue)
To available Windows services.

To lock/unlock Windows service database.
How do you give a Windows service specific permissions

Windows service always runs under someone’s identity. Can be System or
Administrator account, but if you want to restrict the behavior of a
Windows service, the best bet is to create a new user account, assign
and deny necessary privileges to that account, and then associate the
Windows service with that new account.
So basically a Windows service application is just another executable? What’s different about a Windows service as compared to a regular application

Windows services must support the interface of the Service Control Manager
(SCM). A Windows service must be installed in the Windows service
database before it can be launched.
How can you see which services are running on a Windows box

Admin Tools -> Computer Management -> Services and Application ->
Services. You can also open the Computer Management tool by
right-clicking on My Computer and selecting Manage from the popup menu.
Describe the start-up process for a Windows service.

Main()is executed to create an instance of a Web service, then Run() to
launch it, then OnStart() from within the instance is executed.

More C# Interview Questions & Answers here

Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Exclusive Interview Questions and Answers Categories