Author : HASSAN MD TAREQ | Updated : 2021/03/22

Exception in C

Raise exception for testing

try
{
	var x = 1;
	var y = 0;
	unchecked
	{
		var z = x / y;
	}
}
catch (System.Exception)
{

	throw new AppException("Intentional exception");
}