Click here to Skip to main content
15,922,696 members
Home / Discussions / C#
   

C#

 
GeneralRe: Combo box -- Locking Pin
Biswajit Ghosh2-Mar-07 0:52
Biswajit Ghosh2-Mar-07 0:52 
GeneralRe: Combo box -- Locking Pin
sharpiesharpie2-Mar-07 1:02
sharpiesharpie2-Mar-07 1:02 
Questionnumeric textbox Pin
vijayashanthi2-Mar-07 0:20
vijayashanthi2-Mar-07 0:20 
AnswerRe: numeric textbox Pin
Stefan Troschuetz2-Mar-07 0:29
Stefan Troschuetz2-Mar-07 0:29 
AnswerRe: numeric textbox Pin
Frank Kerrigan2-Mar-07 2:26
Frank Kerrigan2-Mar-07 2:26 
Questionhelp regarding .NET Remoting Pin
Zuhair Rizvi1-Mar-07 23:07
Zuhair Rizvi1-Mar-07 23:07 
QuestionHelp regarding XML Pin
anu811-Mar-07 22:48
anu811-Mar-07 22:48 
QuestionTry Catch 101 Pin
Ian Uy1-Mar-07 22:23
Ian Uy1-Mar-07 22:23 
Good Day Sir/Maam,

I wish to ask a very basic question. As I understand, the Try-Catch method catches all the error exception thrown and execute something inside the catch clause. The basic try-catch example:

<br />
try<br />
{<br />
//something erroneous<br />
}<br />
catch<br />
{<br />
MessageBox.Show("ERROR!");<br />
}<br />



A more advance try catch is indicating the exception thrown..

<br />
try<br />
{<br />
//something erroneous<br />
}<br />
catch(some exception)<br />
{<br />
MessageBox.Show("ERROR!");<br />
}<br />
catch(another exception)<br />
{<br />
MessageBox.Show("ERROR!");<br />
}<br />


My Question is this, if I indicated what exceptions to catch (like in the example above), How can I tell the try-catch to catch even the exemptions that wasn't indicated.

I Mean, when comparing it to an If-ElseIf-Else statement, what is the equivalent of "ELSE" in try catch?


I hope im not confusing you. Laugh | :laugh:

Thank you in advance.
AnswerRe: Try Catch 101 Pin
Guffa1-Mar-07 22:30
Guffa1-Mar-07 22:30 
AnswerRe: Try Catch 101 Pin
Russell Jones1-Mar-07 23:42
Russell Jones1-Mar-07 23:42 
AnswerRe: Try Catch 101 Pin
Luc Pattyn2-Mar-07 0:46
sitebuilderLuc Pattyn2-Mar-07 0:46 
GeneralRe: Try Catch 101 Pin
Ian Uy2-Mar-07 1:30
Ian Uy2-Mar-07 1:30 
QuestionPrinting inforamtion Dialog Pin
sathishtl0071-Mar-07 22:18
sathishtl0071-Mar-07 22:18 
AnswerRe: Printing inforamtion Dialog Pin
Luc Pattyn2-Mar-07 0:47
sitebuilderLuc Pattyn2-Mar-07 0:47 
Questionhow to capture packet in promiscus mode Pin
prabir kishore1-Mar-07 22:07
prabir kishore1-Mar-07 22:07 
QuestionFree resources of user control Pin
Robert Rohde1-Mar-07 22:06
Robert Rohde1-Mar-07 22:06 
AnswerRe: Free resources of user control Pin
Hayder Marzouk1-Mar-07 22:11
Hayder Marzouk1-Mar-07 22:11 
AnswerRe: Free resources of user control Pin
Guffa1-Mar-07 22:24
Guffa1-Mar-07 22:24 
GeneralRe: Free resources of user control Pin
Robert Rohde1-Mar-07 23:26
Robert Rohde1-Mar-07 23:26 
QuestionProblem in ASP.NET Control Pin
Mayank Parmar1-Mar-07 21:44
professionalMayank Parmar1-Mar-07 21:44 
AnswerRe: Problem in ASP.NET Control Pin
Frank Kerrigan2-Mar-07 2:34
Frank Kerrigan2-Mar-07 2:34 
QuestionProblem with ListView DrawItem Pin
Iker Llanos1-Mar-07 21:20
Iker Llanos1-Mar-07 21:20 
QuestionIDvdInfo2.GetCurrentLocation() acting strangly! Pin
Khoramdin1-Mar-07 21:07
Khoramdin1-Mar-07 21:07 
QuestionReasoning for public signature of interfaces? Pin
Zoltan Balazs1-Mar-07 20:41
Zoltan Balazs1-Mar-07 20:41 
AnswerRe: Reasoning for public signature of interfaces? Pin
Colin Angus Mackay1-Mar-07 22:18
Colin Angus Mackay1-Mar-07 22:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.