public static void HandleException(ref Exception io_exException,
bool
i_blnPropagateException)
{
switch (true)
{
case io_exException is ApplicationHandledException:
{
if (i_blnPropagateException)
{
throw io_exException;
}
break;
}
case io_exException is ApplicationBusinessException:
{
if (i_blnPropagateException)
{
throw io_exException;
}
break;
}
}
}
This function is not compiling coming with error "A constant value is
required". In the function 'ApplicationHandledException' and
'ApplicationBusinessException' are classes inherited from
System.ApplicationException.
Can someone please help me what is the reason and what is the way around? If
this is not possible what can be the alternative way?