What is the c# equivalent of c++ catch (…), which was a catch-all statement for any possible exception? Does c# support try-catch-finally blocks?



What is the c# equivalent of c++ catch (…), which was a catch-all statement for any possible ..

Answer / Ekta Dohrey

In C#, you can use 'catch(Exception)' as a catch-all statement to handle any type of exceptions. Yes, C# supports try-catch-finally blocks. The finally block is executed after the try and catch blocks, regardless of whether an exception occurred or not.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is multithreading? What are the problems that comes with multithreading and how to manage them?

1 Answers   MCN Solutions,


What is delay signing..??

1 Answers   HCL,


Can a method be sealed in c#?

1 Answers  


What is binary search tree in data structure?

1 Answers  


Why do we use dictionary in c#?

1 Answers  


What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?

1 Answers  


What is difference between private and protected?

1 Answers  


How do you implement thread synchronization (object.wait, notify,and criticalsection) in c#?

1 Answers  


Define c# i/o classes? List the commonly used classes?

1 Answers  


Explain the access modifiers in c#?

1 Answers  


What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default

1 Answers   DELL,


Can we inherit static class in c#?

1 Answers  


Categories