[Mono-list] Mono Newbie Question

Jonathan Pryor jonpryor at vt.edu
Fri Jul 20 12:31:45 EDT 2007


On Fri, 2007-07-20 at 12:10 -0400, Adrien Dessemond wrote:
> A solution could be to make a namespace alias like that :
> 
> #if(MSNet)
> using System.Data.SQLite = SDSQL;
> #else
> using System.Data.Sqlite = SDSQL;
> #endif

You've got that backwards.  It should instead be:

	#if MSNET
	using SDSQL = System.Data.SQLite;
	#else
	using SDSQL = System.Data.Sqlite;
	#endif

This works, but only if you care about source compatibility.  If you
want binary compatibility (e.g. compile on .NET and run on Mono), this
won't work.  A binary compatible approach requires writing a binary
compatible assembly.

 - Jon




More information about the Mono-list mailing list