My partial class didn't targeting the #if in Xamarin Forms project with NETStandard 2.0
A sample of the problem is:
public partial class App : Application
{
#region StaticString
#if __IOS__
public static String A
#endif
#if __ANDROID__
public static String A
#endif
#if WINDOWS_UWP
public static String A;
#endif
#endregion
public App ()
{
InitializeComponent();
InitializeApplication();
#region Teste
#if __IOS__
A="ios";
#endif
#if __ANDROID__
A="droid";
#endif
#if WINDOWS_UWP
A="UWP;
#endif
#endregion
}
}
I need to acess and send specific code for my viewmodels but it was unable and invisible for another class (like this String A).
I saw a sample/way in "Accessing Native Views in Code"
Is it only work in Shared Code ?
Regards