C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
2
Reply
What is Try-Catch in .net?
Brijesh Jalan
15y
6k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
A Try Catch in .Net or any programming language main purpose is to handle the exceptions in a structured manner.
Try
{
// We write the code to be executed
}
Catch(Exception Ex)
{
// To Handle the error
}
Catch(Exception Ex)
{
// To Handle Multiple exceptions of different types
}
If any error got handled then the execution exists or checks the next exception in nested block or also Nested Error ExceptionHandling
Exception is the base Class for ExceptionHandling .For custom Exception handling in the application we need to inherit from BaseClass i.e., Exception
Examples : IndexOutOfRangeException
InvalidCastException
ArgumentOutOfRangeException
NullReferenceException
Sriram D
15y
0
Static class contain only static members(like variables,methods) on it.
Veerareddy pallela
15y
0
How to manipulate data from one table to another table ?
What are the console application application in vb.net ?
Message