[Mono-list] Mono and its limitations

Stifu stifu at free.fr
Thu Apr 2 08:44:54 EDT 2009


You can sometimes use environment paths, such as
System.Environment.GetFolderPath(DesktopDirectory)... This is not always
possible, though (see:
http://www.go-mono.com/docs/index.aspx?link=T%3ASystem.Environment.SpecialFolder).

When defining your paths yourself (and that they are the same for all OSes),
make sure to define your separators the right way rather than hard coding
them as anti-slashes, as that would only work on Windows (see this:
http://www.mono-project.com/Guidelines:Application_Portability#Path_Separators).

Also, you can fork your code if needed, like if (OS == Windows) do this,
else if(...) do that, which ensures you can solve any problem you encounter.


Marco Trapanese wrote:
> 
> 
> 
> Danny-113 wrote:
>> 
>> You English seems pretty OK to me.  To your question (which others may 
>> be able to answer with greater detail): I've been successfully writing 
>> code on Windows and running it on Linux (Ubuntu+Mono) for over a year 
>> now.  It seems that the Mono guys have done a pretty good job at making 
>> a runtime that is compatible with any CLR assembly - at least those 
>> produced with current C# and VB compilers.
>> 
> 
> 
> Thank you both for your kind answers.
> 
> I still have a doubt:
> 
> In my application I often use serial ports or read/write access to files:
> how the code could successfully run either on Windows or Linux? They are
> quite different: for example Windows calls the serial ports "COM" but in
> Linux I have to look under /dev... So I can't understand how the same code
> could run on both systems.
> 
> Marco
> 
> 

-- 
View this message in context: http://www.nabble.com/Mono-and-its-limitations-tp22799220p22847002.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list