Dominique LeBlond: what happened in base class instructor
public class MyException : Exception
{
public MyException ( string message ) : base ( message )
{
}
}
try
{
if(len>5)
throw new MyException("length cannot be > 5");
}
catch (MyException my)
{
Console.WriteLine(my.Message);
}
//-----------------------------------
above,
"length cannot be > 5" passed as parameter to base class constructor.
What happened in base class instructor?
How /why "length cannot be > 5" passed to catch block?