Wouldn't

#if __MonoCS__

do what you want?
 

Mono <[email protected]> wrote on 2014-12-14 at 18:44 +0100:
>> From: Alexander Köplinger [mailto:[email protected]]
>>
>> You can find out if you run on Mono by checking if Type.GetType
>> ("Mono.Runtime") != null.
> That's helpful, but doesn't quite solve it, because compilation will fail on 
> windows ...
>
> I'm looking for something like this...
>
> #ifdef MONO
>             
> Mono.Security.X509.X509StoreManager.CurrentUser.TrustedRoot.Import(junkRootCert);
>             try
>             {
> #endif
>                 DoStuff();
> #ifdef MONO
>             }
>             finally
>             {
>                 
> Mono.Security.X509.X509StoreManager.CurrentUser.TrustedRoot.Remove(junkRootCert);
>             }
> #endif
> _______________________________________________
> Mono-devel-list mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to