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 Framework
 
 


 

 
 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
Requirement is:

try
{
  \\SQL Query
}
catch(Exception i)
  {
    print a
  }
catch(SQLQueryException e)
{
\\SQL Query
}

 
Qu)I Got Exception in "try" block. Which "catch"  statement
(i.e. 1st catch or 2nd catch ) catches the exception and 
Why???
 Question Submitted By :: Shaan.sunswift
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Requirement is: try { \\SQL Query } catch(Exception i) { print a } catch(SQLQueryException e) { \\SQL Query } Qu)I Got Exception in "try" block. Which "catch" statement (i.e. 1st catch or 2nd catch ) catches the exception and Why???
Answer
# 1
when the exception is thrown it will search for mostly
likely to least likely exception so it will catch in second
catch
 
Is This Answer Correct ?    8 Yes 2 No
Sabir
 
  Re: Requirement is: try { \\SQL Query } catch(Exception i) { print a } catch(SQLQueryException e) { \\SQL Query } Qu)I Got Exception in "try" block. Which "catch" statement (i.e. 1st catch or 2nd catch ) catches the exception and Why???
Answer
# 2
it will give compile time error as, the sequence of 
exception class has to be Most Specific => General.
 
Is This Answer Correct ?    3 Yes 2 No
Parikshit
 
 
 
  Re: Requirement is: try { \\SQL Query } catch(Exception i) { print a } catch(SQLQueryException e) { \\SQL Query } Qu)I Got Exception in "try" block. Which "catch" statement (i.e. 1st catch or 2nd catch ) catches the exception and Why???
Answer
# 3
In try block the SQL query will be executed so the exception
will match the SQLException catch because all type of SQL
exception will be match in this SQLException

if we wrote normal query in try block then it will match
Exception catch
 
Is This Answer Correct ?    1 Yes 0 No
Meena
 

 
 
 
Other Dot Net Framework Interview Questions
 
  Question Asked @ Answers
 
What is the use of finalize and dispose eventhough garbage collector is working? Kanbay3
what are generics? Without generics what are the disadvantages in 1.1? HP2
How the framework differentiate between 2 version dlls? eg Version 2.0 and 2.1 dlls are there. both are referred in the code.but we are using only name of that dll not the version number. in run time how the framework know which dll has to be referred? Deloitte1
Where does web.config info stored? Will this be stored in the registry ? Accenture1
What is the use of trace utility ?  1
Tell me the best web-sites for Learning the ASP DOT NET.  1
More on CLR ? MMTS2
Which is the best institute in chennai to learn DotNet?  6
What is a serverside technology? what is a clientside technology? what is a clientserver technology? what is a internet based application? what is a intranet based application? what is a windows application? what is a console application? Difference between console application and windows application? IBM3
reading doc file in textbox using .net2005 with c#  3
What is boxing and unboxing? Kanbay2
What is "out" parameter how it is used in methods? Polaris6
Why are there five tracing levels in System.Diagnostics.TraceSwitcher?  1
About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use ? MMTS2
What is the difference between STA and MTA?  2
What is shared and private assembly ? Accenture2
what is MetadData?. What is CTS? Type of Join in SQL Server? What is diffrence between Primary Key and Unique Key? FutureSoft4
How to add 'ASPNET.mdf' file into server explorer in visual studio 2005?  2
How do assemblies find each other?  1
How would you make a combo-box appear in one column of a DataGrid?  1
 
For more Dot Net Framework 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