[Mono-list] Making code conditional on "not running on mono"?

Philippe Lavoie philippe.lavoie@cactus.ca
Wed, 14 May 2003 14:27:04 -0400

I think the easisest would be for you to send skeletons of those classes =
to the mono team. They would then incoporate them inside mono.

This way, the class will exist, except using them would throw a "Not =
implemented Exception" of something similar.

Just my 0.15 cents

Philippe Lavoie
   Cactus Commerce           Software Developer  *  D=E9veloppeur de =
eBusiness. All Business.          philippe.lavoie@cactuscommerce.com
         35 Gamelin  *  Gatineau  *  QC  *  J8Y1V4  *  Canada=20
        Tel 819.778.0313 x304 *  888.CACTUS.0  *  Fax 819.771.0921=20


-----Original Message-----
From: Stuart Ballard [mailto:stuart.ballard@corp.fast.net]=20
Sent: Wednesday, May 14, 2003 10:23 AM
To: mono-list@lists.ximian.com
Subject: [Mono-list] Making code conditional on "not running on mono"?

I have a C# program which uses some classes (specifically=20
System.DirectoryServices) that aren't implemented in Mono. The code in=20
question is not critical to the application and the majority of the=20
functionality would work fine if it wasn't there. I can't remove the=20
code entirely (because in some cases we actually do need the=20
functionality) but I can't compile on Mono with it present, because the=20
classes aren't found.

Is there any way I can avoid having to have two different copies of the=20
source code, one for Mono without the feature and one for MS.NET with=20
the feature included?

Stuart Ballard, Senior Web Developer
FASTNET - Web Solutions
(215) 283-2300, ext. 126

Mono-list maillist  -  Mono-list@lists.ximian.com