J
Jon Maz
Hi All,
The following code throws a "CS0020: Division by constant zero Exception".
I would have expected to see a nice, friendly "caught an exception" written
to the screen.
Can anyone explain?
TIA,
JON
<%@ Page Language="C#" %>
<script runat="server">
public void Page_Load(Object sender, EventArgs e)
{
try
{
int blob = 1/0;
}
catch(Exception ex)
{
Response.Write("caught an exception");
}
}
</script>
The following code throws a "CS0020: Division by constant zero Exception".
I would have expected to see a nice, friendly "caught an exception" written
to the screen.
Can anyone explain?
TIA,
JON
<%@ Page Language="C#" %>
<script runat="server">
public void Page_Load(Object sender, EventArgs e)
{
try
{
int blob = 1/0;
}
catch(Exception ex)
{
Response.Write("caught an exception");
}
}
</script>