Newbie: Showing that function might throw exception

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way of clearly showing to the programmer that an exception might
be thrown from a function? In C++ you can write:

void MyClass::MyFunction(...) throw (MyException);

Is there anything similar in C#?

Thanks in advance
 
Joachim said:
Is there any way of clearly showing to the programmer that an exception might
be thrown from a function? In C++ you can write:

void MyClass::MyFunction(...) throw (MyException);

Is there anything similar in C#?

Thanks in advance

void MyFunctrion(...)
{
try
{
// do something
}
catch
{
// take corrective action
}
{
 
Back
Top