S
sbalak
I am writing code in C# and I wanted a basic solution:
In Try / Catch block, I want to get a general Exception. So, I write
code as:
try
{
// do something
}
catch (SomethingException ex)
{
// handle ex
}
catch (Exception ex)
{
throw;
}
In the above code, can I write
try
{
}
catch
{
throw;
}
instead of
try
{
}
catch (Exception ex)
{
throw;
}
Please suggest.
Thanks in advance
Santhosh
In Try / Catch block, I want to get a general Exception. So, I write
code as:
try
{
// do something
}
catch (SomethingException ex)
{
// handle ex
}
catch (Exception ex)
{
throw;
}
In the above code, can I write
try
{
}
catch
{
throw;
}
instead of
try
{
}
catch (Exception ex)
{
throw;
}
Please suggest.
Thanks in advance
Santhosh