ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net General
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
Hi,
Requirement is:
try
{
  \\SQL Query
}
 catch(Exception i)
  {
    print a
  }
catch(SQLQueryException e)
{
 \\SQL Query
}
 Got Exception in "try" block. Which "catch" throws 
exception and Why???

Please provide the answer in detail..

Thanks for the help!!!
 Question Submitted By :: Shaan.sunswift
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Hi, Requirement is: try { \\SQL Query } catch(Exception i) { print a } catch(SQLQueryException e) { \\SQL Query } Got Exception in "try" block. Which "catch" throws exception and Why??? Please provide the answer in detail.. Thanks for the help!!!
Answer
# 1
catch(SQLQueryException e)
{
 \\SQL Query
}
 would throw exception as a try can have more than one catch
block that the related exception can be handled individually
 
Is This Answer Correct ?    0 Yes 1 No
Kaushik
 
  Re: Hi, Requirement is: try { \\SQL Query } catch(Exception i) { print a } catch(SQLQueryException e) { \\SQL Query } Got Exception in "try" block. Which "catch" throws exception and Why??? Please provide the answer in detail.. Thanks for the help!!!
Answer
# 2
I tried I got the following ...

Error	1	A previous catch clause already catches all exceptions of this or of a super type ('System.Exception')	E:\dotnet\ConsoleApplication1\ConsoleApplication1\Program.cs	58	20	ConsoleApplication1
 
Is This Answer Correct ?    2 Yes 0 No
Djana
 
 
 

 
 
 
Other Dot Net General Interview Questions
 
  Question Asked @ Answers
 
What are channels in .NET Remoting?  2
Directcast(123.34,integer) - should it throw an error? Why or why not? Wipro1
What are the two kinds of properties. Wipro2
What?s different about a Windows service as compared to a regular application?  1
how to connect database connectivity in dotNET? if suppose SQL server?and also MS access?  5
What are the features of UIP Application Block?  1
What is the use of edititem template ingridview? C-Squared-Systems1
what is a strong name?  3
What is use of ContextUtil class?  1
What are Generics? Where do we use them. Value-Labs2
What are The Main Difference Between Client-server Based Applications and Web Based Applications CTC1
what is the difference between class and structures?  2
Which namespace is the base class for .net Class library?  1
Resource Files: How to use the resource files, how to know which language to use?  1
What is prerender event of a page? C-Squared-Systems3
What base class do all Web Forms inherit from?  1
syntax for binding the data from database Satyam1
How can you automatically generate interface for the remotable object in .NET with Microsoft tools?  1
How different are interface and abstract class in .Net?  2
diff between forms authentication and windows authentication?  4
 
For more Dot Net General Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com