| Author: Abhishek Arya 05 Sep 2008 | Member Level: Diamond | Rating: Points: 3 |
no you can put any number of try catch
|
| Author: Subodh kumar Prajapati 05 Sep 2008 | Member Level: Gold | Rating: Points: 3 |
There is no limit to put try catch block.
|
| Author: ANIL PANDEY 05 Sep 2008 | Member Level: Diamond | Rating: Points: 3 |
hi,
No there is no limit that u have to write only this much TRY CATCH block in ur application u can write any no of block in ur code..
Thanks Anil
|
| Author: Geetha 05 Sep 2008 | Member Level: Gold | Rating: Points: 6 |
try { this.OpenConnection(); // dataAdapter.ReturnProviderSpecificTypes = true; dataAdapter.FillSchema(ReturnDataTable, SchemaType.Source); dataAdapter.Fill(ReturnDataTable); } catch (SqlException se) { //Exception handling will be implemented; string ss = se.Message; } catch (Exception ex) { //Exception handling will be implemented; string ss = ex.Message; } finally { this.CloseConnection(); }
like this you can have multiple catch blocks. No limit for catch blocks.
|
| Author: G.Hemadribabu 05 Sep 2008 | Member Level: Gold | Rating: Points: 6 |
hi devipriya
there is no limitation at all , you put try block and execute set of command, after completion of first try block , introduce second try block and again introduce set of commands to execute, it will automatically works after completion of the first try block
line by line execution takes place, so first try block will execute first, and second and so on ...
hope you are clear with my reply
thank you hemadribabu
|
| Author: Lakhan Pal 05 Sep 2008 | Member Level: Gold | Rating: Points: 3 |
no such limit you can use as many try.. catch and catch block in a single try block.
|