I have a method that fetches data from a web service and does some other functions offline . I have put this code within try/ catch statements . Following is an example of what I'm trying to do .
Is there a way that I can explicitly identify whether the thrown exception is a WebException ? (to get responce)
private SampleMethod()
{
try
{
// get data from web service
// do other offline stuff
}
catch (System.Exception ex)
{
if (// if exception is a web service exception,)
{
// do these
}
else (// if exception is not a web exception)
{
//do these
}
}
}