Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Guidelines to write C# applications for .NET and mono [closed]

Mono claims to be compatible with .NET.

Have you tried it?

Can you share any tips or guidelines for making a running .NET application compatible with mono?

like image 518
FerranB Avatar asked Jan 09 '09 10:01

FerranB


People also ask

What are the rules for writing C programming?

Rules for a Program in C C is a case sensitive language. Most of the program statements are in lower case. All statements must necessarily terminate with a semicolon. Whitespaces should be provided only between variables and keywords.

What are the C standards?

C standard may refer to: ANSI C, C99, C11, C17, or C2x, specifications of the C programming language. C standard library. C tuning (guitar), a type of tuning for guitars.


3 Answers

Might be MoMA helps you

like image 171
Xn0vv3r Avatar answered Sep 20 '22 10:09

Xn0vv3r


See these documents for in-depth answers:

  • General document about Application Portability
  • Porting Winforms Applications
  • Porting ASP.NET Applications
like image 22
David Schmitt Avatar answered Sep 22 '22 10:09

David Schmitt


Basically, unit test like crazy! I support both mono and C# on a pet project (protobuf-net), and getting it to even compile on the range of different platforms was fun (I support mono, CF, Silverlight, etc). There are a number of compiler bugs in mono (even in the current release), in particular relating to generics - which mean you might need to use slightly different code to get it to compile in all flavors.

Then you need to think about which framework features you need. Avoid anything like WPF/WCF/WF, for example. But if you stick to core 2.0 features you are generally OK. There are still a lot of places where mono throws NotImplementedException, though. In one recent case, there were two ways of doing something: the "old" way worked on mono but was [Obsolete] in MS; the "new" version worked on MS, but was NotImplementedException on mono. Fun!

like image 29
Marc Gravell Avatar answered Sep 21 '22 10:09

Marc Gravell