c# - Start to compile and run mono c# code
2012-10-09 15:57
399 查看
Mono is some runtime that you can use on Linux or other Unix box to compile/run C# code . Though I am not sure if I can directly run the code that is compiled by csc and run that that on mono, this is still up in the air for now.
to compile a source code to mono binaries, you can directly do this
msc Hellomono.cs
and to run the compiled output, you can directly do like this:
mono Hellomono.exe
Below is one sample code that I used to test how to use the mono tools
using System;
public class Helloworld
{
public static void Main(string[] args)
{
Console.Out.WriteLine("Hello Mono");
}
}
the output is almost trivial, but it shows that the possibility to write the same code for both the Microsoft C# and the Mono C#.
to compile a source code to mono binaries, you can directly do this
msc Hellomono.cs
and to run the compiled output, you can directly do like this:
mono Hellomono.exe
Below is one sample code that I used to test how to use the mono tools
using System;
public class Helloworld
{
public static void Main(string[] args)
{
Console.Out.WriteLine("Hello Mono");
}
}
the output is almost trivial, but it shows that the possibility to write the same code for both the Microsoft C# and the Mono C#.
相关文章推荐
- 面试题:What will happen when you attempt to compile and run the following code
- How to call code behind method in JavaScript in C# and VS2010?
- How to compile and debug VLC player source code in eclipse IDE on Ubuntu 10.04 (lucid)
- Hadoop: Compile and Run URLCat example code
- Download and run CSQL on Linux -Only two commands will be used to start the server
- Combine Web and Windows Services to Run Your ASP.NET Code at Scheduled
- How to compile and run a simple java file in jenkins on Windows
- How to Compile and Run C/C++ program on Ubuntu 11.10
- FFmpeg Understanding(4. How to compile and run testing files utilizing FFMPEG in VC?)
- how to compile unsafe code in c#
- Java: How to compile and run Java application in command line(在命令行中编译运行java程序)
- use code to generate Silverlight Controls at run time, and serialize the control into XAML file
- How to compile and debug VLC player source code in eclipse IDE on Ubuntu 10.04 (lucid)?
- Excel: How to run C# code behind with a click of a button on a Worksheet, without VBA code
- Setup Eclipse to Compile and Run OIM Custom Clients
- Open source Mono framework brings C# to iPhone and Wii
- Unable to start the Domino 8.5 server as a service and run the Java Cont...
- Android Kernel Compile And Run (转载http://code.google.com/p/androidteam/wiki/AndroidKernelCompileAndRun)
- HOW TO RUN YOUR WEB SERVER AND MQTT WEBSOCKETS BROKER ON THE SAME PORT
- I have a custom view that I want to be able to initialize both in-code and in nib.