.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 >> VB.Net >> Post New Question Subscribe to Interview Questions

What is the difference between System exceptions and Application exceptions?

Posted By :Subhransu Sekhar Jena     Posted Date :October 31, 2014    Points :40   Category :VB.Net 
SystemExceptions are thrown by the CLR and are of more generic nature, whereas, ApplicationExceptions are thrown by Applications. Therefore when creating a custom Exception class we should only inherit it from Application Exception and not SystemException.

You can also find related Interview Question to What is the difference between System exceptions and Application exceptions?  below: 

Difference between System exceptions and Application exceptions?

  
All exception derives from Exception Base class. Exceptions can be generated programmatically
or can be generated by system. Application Exception serves as the base class for all applicationspecific
exception classes. It derives from Exception but does not provide any extended functionality.
You should derive your custom application exceptions from Application Exception.
Application exception is used when we want to define user defined exception, while system
exception is all which is defined by .NET. (More...)

What's difference between System exceptions and Application exceptions?

  
System exceptions are common exceptions thrown by the CLR of .Net Framework. Application exceptions can be user defined exceptions thrown by the application. (More...)

What's difference between System.SystemException and System.ApplicationException?

  
The difference between ApplicationException and SystemException is that SystemExceptions are thrown by the CLR, and ApplicationExceptions are thrown by Applications (More...)

What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"?

  
When you compiles a program using command line, u add the references using /r switch. When you compile a program using Visual Studio, it adds those references to our assembly, which are added using "Add Reference" dialog box. While "using" statement facilitates us to use classes without using their fully qualified names.

For example: if u have added a reference to "System.Data.SqlClient" using "Add Reference" dialog box then u can use SqlConnection class like this:

System.Data.SqlClient.SqlConnection

But if u add a "using System.Data.SqlClient" statement at the start of ur code then u can directly use SqlConnection class.

On the other hand if u add a reference using "using System.Data.SqlClient" statement, but don't add it using "Add Reference" dialog box, Visual Studio will give error message while we compile the program. (More...)

What's the difference between the System.Array.CopyTo() and System.Array.Clone() in c#?

  
The first one performs a deep copy of the array, the second one is shallow. (More...)

What's the difference between the System.Array.CopyTo() and System.Array.Clone()?

  
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object. (More...)

How .NET Framework 2.0 tackles the unhandled exceptions?

  
For .NET Framework 2.0,There is a change in the behavior in which on any unhandled exception, .NET Framework 2.0 just ends the worker process. This exception cannot be caught as it is in the .Net framework 2.0, and when the .Net Framework "goes down", it also crashes the application. In .NET Framework 1.0 or 1.1, unhandled exceptions were ignored.

Workaround for this is :

Add this section in your app.config file.














Thanks,
Virendra Dugar (More...)

What is difference between System.Web.Caching.Cache and System.Web.HttpContext.Current.Cache ?

  
System.Web.Caching.Cache : Class/type used for caching
System.Web.HttoContect.Current.Cache : The instance of cache class for current HTTP context from a web request (Gets cache object from current application domain) (More...)

What is the difference between Application caching and session objects?

  
Session A session is the time for which a particular user interacts with a web application. During a session the unique identity of the user is maintained internally. A session ends if there is a session timeout or user ends sessionby logging out.Sessions may change from user to user.

Cache Caching can be used to temporarily store page output or application data either on the client or on the server, which can then be re-used to satisfy subsequent requests and thus avoid the overhead of re-creating the same information.Caching is particularly suitable when you expect to Cache will be applicable to the entire application through out it's life cycle return the same information in the same format for many different requests.

Application Its nothing but similar to Session with a bit difference that is Session objects have scope within a particular session while application objects having scope within entire application. Application are accessible only from code running within the context of the originating application. Other applications running on the system cannot access or modify the values.
(More...)

What is the difference between System.Web.UI.WebControls.WebParts.WebPart and Microsoft.SharePoint.WebPartPages.WebPart?

  
Microsoft.SharePoint.WebPartPages.WebPart is provided in MOSS 2007 to provide backwards compatability with MOSS 2003 webparts. In MOSS 2007, it is recommended to use System.Web.UI.WebControls.WebParts.WebPart instead.

System.Web.UI.WebControls.WebParts.WebPart does not provides a feature to get or provide to to other webparts.
(More...)

What's the difference between the System.Array.CopyTo() and System.Array.Clone()?

  
The first one performs a deep copy of the array, the second one is shallow. (More...)

Why is it a bad idea to throw your own exceptions?

  
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...)

What is the difference between an application domain and a process?

  
An application domain is lighter than a process. Application domains are appropriate for scenarios that require isolation without the heavy cost associated with running an application within a process. A process runs exactly one application. In contrast, the CLR allows multiple applications to be run in a single process by loading them into separate application domains. Additionally, the CLR verifies that user code in an application domain is type safe. (More...)

What's difference between Web Application Project vs Web Site Project in Visual Studio

  
Web Site Project is deployed with source code to the server and all compilation takes place at runtime.

Web Application Projects, the code behind classes are compiled to dll. That dll is deployed and at runtime, the compiled code in the dll and the markup is combined to create a class which is used by the server to render output. (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