Using Reflection maybe?<br><br><div class="gmail_quote">On Sun, Dec 14, 2014, 15:45 Edward Ned Harvey (mono) <<a href="mailto:edward.harvey.mono@clevertrove.com">edward.harvey.mono@clevertrove.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> From: Alexander Köplinger [mailto:<a href="mailto:alex.koeplinger@outlook.com" target="_blank">alex.koeplinger@<u></u>outlook.com</a>]<br>
><br>
> You can find out if you run on Mono by checking if Type.GetType<br>
> ("Mono.Runtime") != null.<br>
<br>
That's helpful, but doesn't quite solve it, because compilation will fail on windows ...<br>
<br>
I'm looking for something like this...<br>
<br>
#ifdef MONO<br>
            Mono.Security.X509.<u></u>X509StoreManager.CurrentUser.<u></u>TrustedRoot.Import(<u></u>junkRootCert);<br>
            try<br>
            {<br>
#endif<br>
                DoStuff();<br>
#ifdef MONO<br>
            }<br>
            finally<br>
            {<br>
                Mono.Security.X509.<u></u>X509StoreManager.CurrentUser.<u></u>TrustedRoot.Remove(<u></u>junkRootCert);<br>
            }<br>
#endif<br>
______________________________<u></u>_________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.<u></u>com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/<u></u>mailman/listinfo/mono-devel-<u></u>list</a><br>
</blockquote></div>