How to install mono and monodevelop on ubuntu10.04

Source: Internet
Author: User

Today we found a simple method to install mono and monodevelop for. NET development on Linux. Once again, I feel the charm of Mono.

That is through badgerports to install, URL: http://babdgerports.org, a dedicated responsible for Ubuntu mono package installation team to do

BadgerportsIs an Ubuntu repository. in order to use it, you must add it to your software sources.

  1. Click on "system", "Administration", "software sources ".

  2. Click on the "other software" tab.

  3. Click on "add...", and enter the line:

    deb http://badgerports.org lucid main

  4. Click on "add source"

  5. Click on "authentication", then on "Import key file"

  6. Download this GPG key file, Id 0e1fad0c, and select it in the "Import key file" Window

  7. Click on "close", then "reload" when the pop-up appears. You're all set!

From now on, whenever you try to install or update mono-related packages on your system, you will be givenBadgerportsVersion for preference. You don't need to do anything more than update your system as usual to get started!

 

The first mono program, pay attention to the encoding problem

Using system;
Using system. IO;
Using system. text;

Namespace tetsmono
{
Class mainclass
{
Public static void main (string [] ARGs)
{
// Create a file stream
// Filestream FS = new filestream ("/home/guoyuanwei/test", filemode. Open, fileaccess. readwrite );
// Create a text writing object to wrap the file stream
// Streamwriter Sw = new streamwriter (FS, encoding. Default );
Streamwriter Sw = new streamwriter ("/home/guoyuanwei/test", true, encoding. Default );
Try
{
// Write text. A line feed is added by default.
Sw. writeline ("People's Republic of China ");
}
Catch (exception ex)
{
Console. writeline (ex. Message );
}
Finally
{
Sw. Close ();
// Fs. Close ();
}
}

Public static void addtext (filestream FS, string values)
{
Byte [] info = new utf8encoding (true). getbytes (values );
FS. Write (Info, 0, info. Length );
}

}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.