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 feel the strong charm of mono that is installed through badgerports, URL: http://babdgerports.org, a team dedicated to install mono software package on Ubuntu do badgerportsisanUbunturepository. Inordertouseit, yo

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

UsingSystem;
UsingSystem. IO;
UsingSystem. Text;

NamespaceTetsmono
{
ClassMainClass
{
Public Static VoidMain (String[] Args)
{
//Create a file stream
//FileStream fs = new FileStream ("/home/guoyuanwei/test", FileMode. Open, FileAccess. ReadWrite );
//Create a text writing object and wrap the file stream
//StreamWriter sw = new StreamWriter (fs, Encoding. Default );
StreamWriter sw =NewStreamWriter ("/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 VoidAddText (FileStream fs,StringValues)
{
Byte[] Info =NewUTF8Encoding (True). GetBytes (values );
Fs. Write (info,0, Info. Length );
}

}
}

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

Related Article

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.