.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

What is an Exception?

Posted By :Narayanan     Posted Date :October 15, 2011    Points :40   Category :.NET Framework 
It is an event, which occurs during the execution of a program.

You can also find related Interview Question to What is an Exception?  below: 

Why is catch(Exception) almost always a bad idea?

  
Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project. (More...)

Which class is the base class of all the exception classes?

  
System.Exception class is the base class of all the exception classes in .NET. (More...)

Which namespace is used to create an Exception Tree?

  
System.Data.Common.CommandTree namespace provide classes to create an Exception Tree. (More...)

What's the C# equivalent of C++ catch (.), which was a catch-all statement for any possible exception?

  
A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}. (More...)

Difference between Checked and Unchecked exception.

  
A checked exception throws a block of code and represented by the throws keyword. It is utilized to handle invalid criterions outside the control like invalid input, database issues, network outages, unavailable files.

An unchecked exception is utilized for representing defects in the program like invalid arguments passed to methods.

A checked exception need to be handled by try and catch blocks. A checked exception is a compile time exception.

Unchecked exception is a runtime exception. (More...)

How will handle exception in Sql server 2008?

  
SQL Server now supports the use of TRY...CATCH con
handling. TRY...CATCH lets us build error handling at the level we need, in the way wto, by setting a region where if any error occurs, it will break out of the region and head to an error handler. The basic structure is as follows: BEGIN TRY

END TRY
BEGIN CATCH

END CATCH

(More...)

What is difference between throw and throw new Exception()

  
throw; rethrows the original exception and preserves its original stack trace. where as,
throw ex; throws the original exception but resets the stack trace, destroying all stack trace information until your catch block (More...)

Describe exception handling in VB.NET?

  
The Try block encapsulate set of code that is error prone and can throw exception. If an exception is thrown, it can be caught in an appropriate Catch (catch) block. You have Finally block that can contain code that must be executed even if no exception is handled. (More...)

What does a Windows Communication Foundation, or WCF, service application use to present exception information to clients by default?

  
The service cannot return a .NET exception to the client. The WCF service and the client communicate by passing SOAP messages. If an exception occurs, the WCF runtime serializes the exception into XML and passes that to the client. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend