the type or namespace name 'SystemException' could not be found in Xamarin.Forms (PCL).it targets .net framework 4.5 and ASP.NET Core 1.0. Is there any alternative way to find the system exceptions in xamarin.forms(PCL).

enter image description here

1

There are 1 best solutions below

0
nevermore On

Xamarin.forms target .NetStand 2.0 and .NetStand 2.1. I just test and you can use System.SystemException under these two versions:

    try
    {

    }
    catch (Exception ex)
    {

        if (ex is System.SystemException)
        {

        }
    }

System.SystemException is also available in .net framework 4.5 while does not available in .Net Core 1.0.

You can check if it is available in this document.