'Catch exception' extension on Task class

I have code like this: try { await myFunc(); } catch (MyException ex) { switch (ex.Code) { case 1: … break; case 2: … break; … } } And was wondering is it possible to make all that look something like this: … { await myFunc().HandleMyExeptions(OnMyException); } private void OnMyException(int exCode) { switch (ex.Code) {… Read More 'Catch exception' extension on Task class

Is there a reason why OnePlus devices don't have the Build.VERSION.RELEASE_OR_CODENAME value

The following code works on Samsung devices to get the Android version number: String buildVersionRelease = Build.VERSION.RELEASE_OR_CODENAME; The same code returns this error on OnePlus devices (3T and 5T) java.lang.NoSuchFieldError: No static field RELEASE_OR_CODENAME of type Ljava/lang/String; in class Landroid/os/Build$VERSION; or its superclasses (declaration of ‘android.os.Build$VERSION’ appears in /system/framework/framework.jar!classes2.dex) >Solution : You can take it… Read More Is there a reason why OnePlus devices don't have the Build.VERSION.RELEASE_OR_CODENAME value