| |
GeekInterview.com > Interview Questions > Microsoft > Microsoft.NET
| Print | |
Question: Handle interface error
Answer: How Handle error if interface A,B are extended in class C. If class C using one function that is in A Interface if any error occurs in function how do you handle it? |
| March 03, 2009 07:34:08 |
#2 |
| chetal |
Member Since: March 2009 Total Comments: 1 |
RE: Handle interface error |
Interfaces can have function body. If the body of the function is provided you can handle the exception in the function in interface A using try catch statements. OR Handle the exception in class C where the function of interface A is called using try catch. OR use throws clause in class defination of C or function defination in A. |
| |
Back To Question | |